How can I iterate over variable yum_output results? - 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 Many thanks, Ozgur -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/264b5382-b93b-4b4d-bbe3-07c713f2c83dn%40googlegroups.com.