diff --git a/tasks/configure.yml b/tasks/configure.yml index 802a378..9da606c 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -1,10 +1,4 @@ --- -- name: collect vhosts - community.docker.docker_container_exec: - container: "{{ rabbitmq_container.name }}" - command: rabbitmqctl list_vhosts - register: list_vhosts - - name: collect users community.docker.docker_container_exec: container: "{{ rabbitmq_container.name }}" @@ -23,7 +17,6 @@ container: "{{ rabbitmq_container.name }}" command: "rabbitmqctl add_vhost {{ item.vhost }}" loop: "{{ rabbitmq_users }}" - when: "item.vhost not in list_vhosts.stdout" ignore_errors: "{{ ansible_check_mode }}" - name: Create users