Open idelsink opened 4 years ago
Hey @idelsink ,
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.
Hi @jaredledvina ,
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.
ansible 2.9.1
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/ingmar/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.7.5 (default, Oct 17 2019, 12:09:47) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]
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 vhost
tags: rabbitmq
wait_for:
timeout: 3
when: 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: https://github.com/sensu/sensu-ansible/blob/9db24c810a4480f7bbf70c7de63d9220aa9f63c9/tasks/rabbit.yml#L53-L57
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.