Hi Ansible Gurus ,
i have below task :
- name: RPM EPOCH Finder
    #command: rpm -qa --qf '%|EPOCH?{%{EPOCH}}:{0}|\n' {{
item.split('.')[0] | regex_replace('-\d+', '')}}
    command: rpm -qa --qf '%|EPOCH?{%{EPOCH}}:{0}|\n' {{ item.split('.')[0]
| regex_replace('-\d+', '')}}
    with_items:
      - "{{ my_hotfix_rpms }}"
    register: r
    args:
      warn: false
 I am trying to get a part of RPM name (Epoch) from rpm list in a system. If
Epoch is present then it prints the value otherwise prints “0”. Since this
package name can have any version , so I am using regex to fetch only the
name from the variable.
But I am getting an error telling it is an incomplete Jinja template .Is it
because of the ternary operator used?  Any idea ?

Regards
Rahul

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAGH8rEyfiqH76MEZaCLna5YC1KCJJBJQOG3LYGP6hzubZXtbQg%40mail.gmail.com.

Reply via email to