--- - name: Remove rabbitmq users rabbitmq_user: user: "{{ item }}" state: absent with_items: "{{ rabbitmq_users_absent }}" - name: Add rabbitmq users rabbitmq_user: user: "{{ item.user }}" password: "{{ item.password }}" vhost: "{{ item.vhost | default('/') }}" configure_priv: "{{ item.configure_priv | default('.*') }}" read_priv: "{{ item.read_priv | default('.*') }}" write_priv: "{{ item.write_priv | default('.*') }}" tags: "{{ item.tags | default('') }}" no_log: true with_items: "{{ rabbitmq_users }}"