On 03.04.19 16:22, Kunalsing Thakur wrote: > --- > - name: Logging into pulp > shell: pulp-admin login -u admin -p admin > - name: searching the rpm into pulp repo > shell: pulp-admin rpm repo content rpm --repo-id=mobi-snapshots --match > 'filename={{ item }}' > with_items: "{{ rpmname | default([]) }}" > register: pulp > when: rpmsearch is defined
You are using register with a loop. That means pulp.results is a list and there's an element for each item in that list. You can access the stdout for the first item with pulp.results.0.stdout Sebastian -- Sebastian Meyer Linux Consultant & Trainer Mail: me...@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d0544de0-7767-8996-9d83-c037b4307869%40b1-systems.de. For more options, visit https://groups.google.com/d/optout.