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-201903291228.ed4d6a0.noarch
>   serial: 1
>   any_errors_fatal: true
>   roles:
>     - role: mobi_ansible_role_pulp
> 
> Pulp.yaml:-
> 
> ---
> - 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
> - debug:
>     var: pulp.results.stdout
> 

Hello Kunalsing,

please try pulp.stdout instead.

Regards
          Racke

> 
> Playbook output:-
> PLAYBOOK: pulp.yaml 
> **********************************************************************************************
> 1 plays in pulp.yaml
>  [WARNING]: Found variable using reserved name: remote_user
> 
> 
> PLAY [Deploying PCC-test] 
> ****************************************************************************************
> 
> TASK [Gathering Facts] 
> *******************************************************************************************
> task path: /etc/ansible/playbooks/paytv/pulp.yaml:2
> Wednesday 03 April 2019  14:18:45 +0000 (0:00:00.136)       0:00:00.136 
> *******
> ok: [node]
> META: ran handlers
> 
> TASK [mobi_ansible_role_pulp : include_tasks] 
> ********************************************************************
> task path: /etc/ansible/roles/mobi_ansible_role_pulp/tasks/main.yml:12
> Wednesday 03 April 2019  14:18:49 +0000 (0:00:03.725)       0:00:03.862 
> *******
> included: /etc/ansible/roles/mobi_ansible_role_pulp/tasks/pulp.yaml for 
> inplp01p2.infra.smf1.mobitv
> 
> TASK [mobi_ansible_role_pulp : Logging into pulp] 
> ****************************************************************
> task path: /etc/ansible/roles/mobi_ansible_role_pulp/tasks/pulp.yaml:2
> Wednesday 03 April 2019  14:18:49 +0000 (0:00:00.409)       0:00:04.271 
> *******
> changed: [node] => changed=true
>   cmd: pulp-admin login -u admin -p admin
>   delta: '0:00:01.010085'
>   end: '2019-04-03 14:18:51.477441'
>   rc: 0
>   start: '2019-04-03 14:18:50.467356'
>   stderr: ''
>   stderr_lines: []
>   stdout: |-
>     [0m[92mSuccessfully logged in. Session certificate will expire at Apr 10 
> 14:18:51 2019
>     GMT.[0m
>   stdout_lines: <omitted>
> 
> TASK [mobi_ansible_role_pulp : searching the rpm into pulp repo] 
> *************************************************
> task path: /etc/ansible/roles/mobi_ansible_role_pulp/tasks/pulp.yaml:4
> Wednesday 03 April 2019  14:18:51 +0000 (0:00:01.985)       0:00:06.256 
> *******
> changed: [node] => 
> (item=mobi-auth-manager-5.42.0-201903291228.ed4d6a0.noarch) => changed=true
>   cmd: pulp-admin rpm repo content rpm --repo-id=mobi-snapshots --match
> 'filename=mobi-auth-manager-5.42.0-201903291228.ed4d6a0.noarch'
>   delta: '0:00:01.417179'
>   end: '2019-04-03 14:18:53.720125'
>   item: mobi-auth-manager-5.42.0-201903291228.ed4d6a0.noarch
>   rc: 0
>   start: '2019-04-03 14:18:52.302946'
>   stderr: ''
>   stderr_lines: []
>   stdout: |-
>     [0mArch:         noarch
>     Buildhost:    3c33318f8330
>     Checksum:     
> 33816f5a2680403526591148da282e680655ad354fe23f80cc100824dcc1b4f1
>     Checksumtype: sha256
>     Description:  Mobi Auth Manager
>     Epoch:        0
>     Filename:     mobi-auth-manager-5.42.0-201903291228.ed4d6a0.noarch.rpm
>     License:      MobiTV, Inc.
>     Name:         mobi-auth-manager
>     Provides:     mobi-auth-manager = 5.42.0-201903291228.ed4d6a0-0,
>                   osgi(ch.qos.logback.classic) = 1.1.2-0, 
> osgi(ch.qos.logback.core)
>                   = 1.1.2-0, osgi(com.google.guava) = 14.0.1-0,
>                   osgi(com.sun.jersey.client) = 1.17.0-0,
>                   osgi(com.sun.jersey.contribs.jersey-apache-client) = 
> 1.17.0-0,
>                   osgi(com.sun.jersey.contribs.jersey-apache-client4) = 
> 1.17.1-0,
>                   osgi(com.sun.jersey.contribs.jersey-spring) = 1.17.0-0,
>                   osgi(com.sun.jersey.core) = 1.17.0-0,
>                   osgi(com.sun.jersey.jersey-server) = 1.17.0-0,
>                   osgi(com.sun.jersey.json) = 1.17.0-0, 
> osgi(com.sun.jersey.servlet)
>                   = 1.17.0-0, osgi(com.sun.xml.bind) = 2.2.3-0, 
> osgi(curator-client)
>                   = 2.2.0-0, osgi(curator-framework) = 2.2.0-0,
>                   osgi(curator-recipes) = 2.2.0-0, osgi(curator-x-discovery) =
>                   2.2.0-0, osgi(jackson-core-asl) = 1.9.12-0, 
> osgi(jackson-jaxrs) =
>                   1.9.9-0, osgi(jackson-mapper-asl) = 1.9.9-0, 
> osgi(jackson-xc) =
>                   1.9.9-0, osgi(javax.ws.rs.jsr311-api) = 1.1.1-0, 
> osgi(jaxb-api) =
>                   2.2.2-0, osgi(jcl.over.slf4j) = 1.7.7-0, 
> osgi(log4j.over.slf4j) =
>                   1.7.7-0, osgi(org.apache.commons.codec) = 1.10.0-0,
>                   osgi(org.apache.commons.collections) = 3.2.1-0,
>                   osgi(org.apache.commons.io) = 2.4.0-0,
>                   osgi(org.apache.commons.lang) = 2.6-0,
>                   osgi(org.apache.commons.net) = 2.2-0,
>                   osgi(org.apache.hadoop.zookeeper) = 3.4.5-0,
>                   osgi(org.codehaus.jettison.jettison) = 1.1-0,
>                   osgi(org.jboss.netty) = 3.2.3-0,
>                   osgi(org.mortbay.jetty.servlet-api-2.5) = 2.5-0, 
> osgi(slf4j.api) =
>                   1.7.7-0, osgi(stax2-api) = 3.1.4-0, osgi(woodstox-core-asl) 
> =
>                   4.4.1-0
>     Release:      201903291228.ed4d6a0
>     Requires:     mobi-tomcat-config-8080 >= 8.0.17-0
>     Version:      5.42.0
>   stdout_lines: <omitted>
> 
> TASK [mobi_ansible_role_pulp : debug] 
> ****************************************************************************
> task path: /etc/ansible/roles/mobi_ansible_role_pulp/tasks/pulp.yaml:9
> Wednesday 03 April 2019  14:18:53 +0000 (0:00:02.239)       0:00:08.496 
> *******
> ok: [node] =>
>   pulp.results.stdout: 'VARIABLE IS NOT DEFINED!: ''list object'' has no 
> attribute ''stdout'''
> 
> -- 
> 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 
> <mailto:ansible-project+unsubscr...@googlegroups.com>.
> To post to this group, send email to ansible-project@googlegroups.com 
> <mailto:ansible-project@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/4f149a07-bf0a-4a5e-a1c2-6d40ce6fe993%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/4f149a07-bf0a-4a5e-a1c2-6d40ce6fe993%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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/ea9f33b6-a644-e624-0778-f80494a3d14c%40linuxia.de.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to