You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 'pause' module bypasses the host loop, which is currently not supported in the free strategy and would instead execute for every host in the inventory list.
#227
Open
idelsink opened this issue
Dec 2, 2019
· 4 comments
ERROR! The 'pause' module bypasses the host loop, which is currently not supported in the free strategy and would instead execute for every host in the inventory list.
The error appears to be in '/home/username/.ansible/roles/sensu.sensu/tasks/rabbit.yml': line 53, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Wait for RabbitMQ to be up and running before asking to create a vhost
^ here
The following statement uses a pause to wait for something:
Oh fun, I wonder if this is something new with updated versions of Ansible. If you're willing to PR the change, I'm happy to check it out. Would also be interested in the version of Ansible you're using and on what operating systems.
Yeah always fun when something seems to break. I'm running Ansible v2.9.1.
For my OS i'm using Fedora 30 (soon to be 31) and Ubuntu 18.04.3 LTS as a target.
Interesting in te docs for the pause module it states:
Pauses playbook execution for a set amount of time, or until a prompt is acknowledged. All parameters are optional. The default behavior is to pause with a prompt.
To pause/wait/sleep per host, use the wait_for module.
So I think that the most basic solution would be to replace it with the following:
- name: Wait for RabbitMQ to be up and running before asking to create a vhosttags: rabbitmqwait_for:
timeout: 3when: sensu_rabbitmq_state is changed
I'm getting same error in our playbook for this task with strategy set to free even when new_node_name is defined 😢:
- name: Prompt for new_node_name if not defined
ansible.builtin.pause:
prompt: "Enter 'new_node_name' "
register: new_node_name_prompt
when: new_node_name is not defined
I get the following error:
The following statement uses a pause to wait for something:
sensu-ansible/tasks/rabbit.yml
Lines 53 to 57 in 9db24c8
I'm running ansible
ansible 2.9.1
and am using version5.4.0
of the sensu role.Proposed solution
It would be better to use the
wait_for
option and to actually wait for RabbitMQ to be up and running.The text was updated successfully, but these errors were encountered: