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
role
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:
> - mobi-auth-manager-5
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:
> - mobi-auth-manager-5.42.0-201903
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 | de
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 in
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: /etc/ansible/roles/mobi_ansib
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 +000
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]
> ***
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 (pulp.re
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([]) }}"
regis
10 matches
Mail list logo