--- - name: Include rabbitmq installation tasks include: "{{ ansible_os_family }}/install.yaml" - include: configure.yaml - include: configure-cluster.yaml when: rabbitmq_cluster - name: Start rabbitmq server service: name: rabbitmq-server enabled: True state: started - block: - include: vhosts.yaml - include: ha_policy.yaml - include: users.yaml when: - rabbitmq_cluster - ansible_hostname == hostvars[ansible_play_hosts.0].ansible_hostname - block: - include: vhosts.yaml - include: ha_policy.yaml - include: users.yaml when: - not rabbitmq_cluster - include: plugins.yaml