Ansible 2.5.1 does not run a task

23 views
Skip to first unread message

Chris Barlock

unread,
Aug 23, 2018, 8:36:09 PM8/23/18
to Ansible Project
I just upgraded a set of Ubuntu machines from 16.04.5 to 18.04.1, which now has Ansible 2.5.1 installed.  An existing Ansible project that I have seems to skip a step.  With verbose mode enabled, I see that it starts the step:

PLAY [master] *****************************************************************************************************************************************************************************************************************************


TASK [Gathering Facts] ********************************************************************************************************************************************************************************************************************

task path: /root/ansible/deploy.yaml:38


and runs Gathering Facts -- buts that's it for this task.  It ends with:


<9.42.2.49> ESTABLISH SSH CONNECTION FOR USER: root

<9.42.2.49> SSH: EXEC sshpass -d17 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/706a93c156 9.42.2.49 '/bin/sh -c '"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1535069761.99-146742452019957/ > /dev/null 2>&1 && sleep 0'"'"''

<9.42.2.49> (0, '', '')

ok: [9.42.2.49]

META: ran handlers

META: ran handlers

META: ran handlers


before moving on to the next PLAY.  Any thoughts on why this PLAY does not complete?  Quite possibly, there are others that did not complete as expected & I just don't know it.  

Jonathan Lozada De La Matta

unread,
Aug 23, 2018, 8:38:11 PM8/23/18
to ansible...@googlegroups.com
can you show the tasks?

--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/371ead49-90a7-4673-85c3-adbc4448ca64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Jonathan lozada de la matta

AUTOMATION CONSULTANT - AUTOMATION PRACTICE

Red Hat Consulting Services

jloz...@redhat.com   



 

Chris Barlock

unread,
Aug 23, 2018, 8:54:24 PM8/23/18
to Ansible Project
The tasks from a <step>/tasks/main.yaml:

---

# Tasks file for setup-icp.


- name: "Create ICP directory"

  file: 

    path: "{{ icp_image_dir }}"

    state: directory


- debug:

    msg: "The following step may take some time.  The file is large."

  

- name: "Copy ICP tar file"

  get_url: 

    url: http://xxx.com/projects/c/cloudnative/ICP/{{ icp_tar }}

    dest: "{{ icp_image_dir }}/{{ icp_tar }}"

    force: no

      

- debug:

    msg: "The following step is also time consuming."


- name: "Load ICP images into Docker"

  shell: tar -xf {{ icp_image_dir }}/{{ icp_tar }} -O | sudo docker load

       

- name: "Extract sample configuration file"

  command: docker run -v {{ icp_dir }}:/data -e LICENSE=accept ibmcom/icp-inception:{{ icp_version }}-ee cp -r cluster /data    

  

- name: "Copy SSH key"

  copy:

    src: ~/.ssh/id_rsa

    dest: "{{ icp_dir }}/cluster/ssh_key" 


- name: "Write hosts file"

  copy:

    src: "{{ inventory_file }}"

    dest: "{{ icp_dir }}/cluster/hosts" 

Chris Barlock

unread,
Aug 24, 2018, 10:19:01 AM8/24/18
to Ansible Project
Well, I rebuilt my Ansible tool and now it behaves properly.

Reply all
Reply to author
Forward
0 new messages