---
- name: Use builtin Jinja filters and python string methods in actions
  hosts: all
  sources:
    - ansible.eda.generic:
        payload:
           - name: "host1.xyz"
           - name: "host2.jkl"
        create_index: index
  rules:
    - name: "Test Jinja filters"
      condition: true
      action:
        debug:
           msg:
             - " {{ event.name|replace('.xyz','') }} "
             - " {{ event.name.split('.') | first }} "
             - " {{ event.name.capitalize()}} "
