]> git.immae.eu Git - github/fretlink/ansible-rabbitmq.git/blobdiff - playbook.yml
Added support for CentOS and Vagrant
[github/fretlink/ansible-rabbitmq.git] / playbook.yml
diff --git a/playbook.yml b/playbook.yml
new file mode 100644 (file)
index 0000000..a9a7bba
--- /dev/null
@@ -0,0 +1,25 @@
+---
+- hosts: all
+  become: true
+  vars:
+    - pri_domain_name: 'test.vagrant.local'
+  roles:
+  tasks:
+    - name: updating /etc/hosts
+      lineinfile:
+        dest: /etc/hosts
+        regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}"
+        line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}"
+        state: present
+      with_items: groups['all']
+      
+- hosts: all
+  become: true
+  vars:
+    - config_rabbitmq_ha: true
+    - enable_rabbitmq_clustering: true
+    - pri_domain_name: 'test.vagrant.local'
+    - rabbitmq_master: 'node0'
+  roles:
+    - role: ansible-rabbitmq
+  tasks: