Hi Brian,

I was able to successfully do this task by following the instructions.
Thanks for matt to give some logic.

- name: searching the rpm into {{ reponame }} repo
  shell: pulp-admin rpm repo content rpm --repo-id={{reponame}} --match
'filename={{ item }}'
  loop: "{{ rpmname | default([]) }}"
  register: pulp
  when: search is defined
  failed_when: pulp.stdout == "\u001b[0m"

Result:-
TASK [mobi_ansible_role_pulp : searching the rpm into infra]
******************************
task path: /etc/ansible/roles/mobi_ansible_role_pulp/tasks/pulp.yaml:5
Saturday 06 April 2019  10:07:15 +0000 (0:00:02.298)       0:00:02.709
********
failed: [node]
(item=GoIP-devel-1.6.11-201711302323.798cb6f.el7.centos.x86_64.rpm) =>
changed=true
  cmd: pulp-admin rpm repo content rpm --repo-id=mobi-infra.smf1.mobitv
--match
'filename=GoIP-devel-1.6.11-201711302323.798cb6f.el7.centos.x86_64.rpm'
  delta: '0:00:00.781775'
  end: '2019-04-06 10:07:17.178794'
  failed_when_result: true
  item: GoIP-devel-1.6.11-201711302323.798cb6f.el7.centos.x86_64.rpm
  rc: 0
  start: '2019-04-06 10:07:16.397019'
  stderr: ''
  stderr_lines: []
  stdout: "\e[0m"
  stdout_lines: <omitted>


This issue is resolved now. :)


On Fri, Apr 5, 2019 at 1:09 AM Brian Coca <bc...@redhat.com> wrote:

> ''pulp.results.[0].std" is incorrect you have extra .
> "pullp.results[0].std" is the correct form
>
> --
> ----------
> Brian Coca
>
> --
> 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/CACVha7crqc5aH3pSvFUhHeMt6JG4GZfS2G6g-e6qwfVdWO7Z%2BA%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CACVha7crqc5aH3pSvFUhHeMt6JG4GZfS2G6g-e6qwfVdWO7Z%2BA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 


[image: --]

kunalsing thakur
[image: https://]about.me/kunalsingthakur
<https://about.me/kunalsingthakur?promo=email_sig&utm_source=email_sig&utm_medium=email_sig&utm_campaign=external_links>

-- 
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/CANErU6keHH6ct%2Bq81PESHJc%2BeB7cPW9wk8bDyNYH8b0Jz75qbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to