Comment 14 for bug 1466982

Revision history for this message
Kevin Carter (kevin-carter) wrote :

i think that we can do what claco says with two tasks one with a when condition pinning to the first host and the others excluding the first host.

Example:

- name: Ensure default rabbitmq guest user is removed
  rabbitmq_user:
    user: guest
    state: absent
  when: inventory_hostname == rabbitmq_all[0]
  tags:
    - rabbitmq-user

- name: Ensure default rabbitmq guest user is removed
  rabbitmq_user:
    user: guest
    state: absent
  when: inventory_hostname != rabbitmq_all[0]
  tags:
    - rabbitmq-user

This would side step the race and make sure that the user is eradicated on all hosts no matter how they we're setup.