Re: [ansible-project] how to access debug stdout variable

2019-04-06 Thread Kunalsing Thakur
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([]) }}"

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Kunalsing Thakur
Hi sebastian, pulp.results.0.stdout give me output "\e[0m" But when I try to access in failed_when condition It is giving me below error. fatal: [node]: FAILED! => msg: 'The conditional check ''pulp.results.0.stdout == "\e[0m"'' failed. The error was: error while evaluating conditional

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Sebastian Meyer
On 03.04.19 16:44, Kunalsing Thakur wrote: > Hi sebastian, > when i try to fail the task with this below condition i get the error in > task > > *failed_when: pulp.results.0.stdout == "\e[0m"* > > TASK [mobi_ansible_role_pulp : searching the rpm into pulp repo] >

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Kunalsing Thakur
when i print the pulp.results.0.stdout it will give me following output:- TASK [mobi_ansible_role_pulp : debug] task path: /etc/ansible/roles/mobi_ansible_role_pulp/tasks/pulp.yaml:9 Wednesday 03 April 2019 14:46:40

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Kunalsing Thakur
Hi sebastian, when i try to fail the task with this below condition i get the error in task *failed_when: pulp.results.0.stdout == "\e[0m"* TASK [mobi_ansible_role_pulp : searching the rpm into pulp repo] * task path:

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread kunalsing thakur
Thank You sebastian. Now i am able to print stdout using pulp.results.0.stdout On Wed, Apr 3, 2019 at 8:01 PM Sebastian Meyer wrote: > 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

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Sebastian Meyer
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 |

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Stefan Hornburg (Racke)
On 4/3/19 4:22 PM, Kunalsing Thakur wrote: > playbook:- > task:- > - name: Deploying PCC-test >   hosts: pulp >   gather_facts: true >   vars_files: >     - /etc/ansible/inventories/group_vars/common.yaml >   vars: >     - rpmsearch: true >     - rpmname: >     -

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Raghavendra Rao
On Wed, 3 Apr 2019 at 19:52, Kunalsing Thakur wrote: > playbook:- > task:- > - name: Deploying PCC-test > hosts: pulp > gather_facts: true > vars_files: > - /etc/ansible/inventories/group_vars/common.yaml > vars: > - rpmsearch: true > - rpmname: > -

[ansible-project] how to access debug stdout variable

2019-04-03 Thread Kunalsing Thakur
playbook:- task:- - name: Deploying PCC-test hosts: pulp gather_facts: true vars_files: - /etc/ansible/inventories/group_vars/common.yaml vars: - rpmsearch: true - rpmname: - mobi-auth-manager-5.42.0-201903291228.ed4d6a0.noarch serial: 1 any_errors_fatal: true