Hi - I posted in ansible project group by mistake. 

How can I iterate over variable yum_output results?
Task I want to script is roughly like this 

- name: List installed and available versions of packages.
  yum:
    list: "{{ packages }}"
  vars:
    packages:
      - libsss_idmap
      - openldap-clients
      - glibc-common
      - sssd-client
  register: yum_output

- name: Print available package versions.
  debug:
    msg: "{{ item.version }}-{{ item.release }}"
  loop: "{{ yum_output.results | selectattr('yumstate', 'equalto', 'available') 
| list }}"

- debug: var=yum_output

Any suggestions?

Many thanks,
Ozgur

-- 
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/2e97925c-bd62-4cb8-bbf9-13a4dd452c39n%40googlegroups.com.

Reply via email to