Did you get those playbooks from https://github.com/opnfv/apex/tree/master/lib/ansible/playbooks ? If so, just a link would have been sufficient, rather than copy pasting them as an unreadable piece of HTML email.
In any case, those playbooks are part of a much larger set of playbooks and code. They’re highly specific to the OPNFV project. I would suggest asking the people/authors over there first. Dick On Tue, 28 May 2019 at 13:56, Deva Krishnan <devan.krishnan1...@gmail.com> wrote: > Hi @ansible folks, > > Recently I found an Ansible error while installing Opnfv-Apex. I'm getting > the below error message while deploying. It seems to be Ansible playbook > failed error. > > *Error Message :* > > *2019-05-27 20:45:16,635 INFO: TASK [include_tasks] > ************************************************************ > *task path: > /usr/share/opnfv-apex/ansible/playbooks/prepare_overcloud_containers.yml:31* > *fatal: [192.168.122.244]: FAILED! => {"msg": "The conditional check 'item > in (response.json)['repositories']|join(\" \")' failed. The error was: > error while evaluating conditional (item in > (response.json)['repositories']|join(\" \")): 'dict object' has no > attribute 'json'* > > *The error appears to be in > '/usr/share/opnfv-apex/ansible/playbooks/prepare_overcloud_containers.yml': > line 31, column 7, but may* > *be elsewhere in the file depending on the exact syntax problem.* > > *The offending line appears to be:* > > * register: response* > * - include_tasks: patch_containers.yml* > * ^ here* > *"}* > > > *2019-05-27 20:45:16,635 INFO: PLAY RECAP > ********************************************************************** > *192.168.122.244 : ok=5 changed=3 unreachable=0 > failed=1 skipped=0 rescued=0 ignored=0 * > > > *2019-05-27 20:45:16,671 ERROR: Ansible playbook failed. See Ansible logs > for details.* > *2019-05-27 20:45:16,671 ERROR: Unable to complete container prep on > Undercloud* > *Traceback (most recent call last):* > * File "/bin/opnfv-deploy", line 10, in <module>* > * sys.exit(main())* > * File "/usr/lib/python3.4/site-packages/apex/deploy.py", line 535, in > main* > * tmp_dir=APEX_TEMP_DIR)* > * File "/usr/lib/python3.4/site-packages/apex/common/utils.py", line 146, > in run_ansible* > * raise Exception(e)* > *Exception: Ansible playbook failed. See Ansible logs for details.* > > > *===================================================================================================================================================* > > > > *FYI : Attached the yaml files of **prepare_overcloud_containers.yml > and * > *patch_containers.yml below. Please let me know if you need any more > information from my side. Hope some one can help me soon in this > case.Thanks in advance.* > > > > > *[root@localhost playbooks]# cat patch_containers.yml --- - name: "Pull > docker image to ensure it exists locally: {{ item }}" shell: "{{ > container_client }} pull {{ undercloud_ip }}:8787/tripleo{{ os_version > }}/centos-binary-{{ item }}:current-tripleo" - name: "Find docker image > user {{ item }}" shell: > {{ container_client }} inspect > --format='{{ '{{' }}.ContainerConfig.User{{ '}}' }}' {{ undercloud_ip > }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:current-tripleo > register: user_result - name: "Patch docker image {{ item }}" shell: > > cd /home/stack/containers/{{ item }} && {{ container_client }} build > --build-arg REAL_USER={{ user_result.stdout }} -t {{ undercloud_ip > }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:apex .* > > * register: response - include_tasks: patch_containers.yml > with_items: "{{ patched_docker_services }}" loop_control: > loop_var: item when: - patched_docker_services|length > 0 > - item in (response.json)['repositories']|join(" ")* > > > > > > > > > -- > 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/210adedc-bf8d-4cb8-b908-05bd65ef162f%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/210adedc-bf8d-4cb8-b908-05bd65ef162f%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Sent from a mobile device - please excuse the brevity, spelling and punctuation. -- 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/CAL8fbwMAitzo5QykRyHOe_eLe8dtKVgD%2Bm0CzGNPFMbFJUO9Tg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.