wait_for and with_items hangs

13 views
Skip to first unread message

Dean Kamali

unread,
Nov 15, 2017, 10:54:27 AM11/15/17
to Ansible Project
Hey everyone 

I'm trying this combination, can't figure out what I'm doing wrong, 

When I try the following it works

- name: Wait for service
wait_for:
path: /tmp/node-41.log
search_regex: 'Docker is up and running'
delegate_to: localhost


However when I try and loop over hosts group, it hangs forever. 

- name: Wait for service
wait_for:
path: /tmp/node-41.log
search_regex: 'Docker is up and running'
delegate_to: localhost
with_items: hosts.manager

Any ideas on why? 
Message has been deleted

Dean Kamali

unread,
Nov 15, 2017, 11:14:29 AM11/15/17
to Ansible Project
Found it! 


- name: Wait for service
wait_for:
path: /tmp/{{ item }}.log
search_regex: 'Docker is up and running'
timeout: 5
delegate_to: localhost
with_items: "{{ groups['manager'] }}"

Reply all
Reply to author
Forward
0 new messages