aboutsummaryrefslogtreecommitdiffhomepage
path: root/playbook.yml
diff options
context:
space:
mode:
authorLarry Smith Jr <mrlesmithjr@gmail.com>2017-05-20 21:18:56 -0400
committerLarry Smith Jr <mrlesmithjr@gmail.com>2017-05-20 21:18:56 -0400
commitf36f2edd9429200fbd18eeecfbba4b5fe891f26d (patch)
treebbacfde831ffd7c6c83e849994f6b9b2101e5b52 /playbook.yml
parent0da13499e7d937f1fa53aa3717b7bb1deda36483 (diff)
downloadansible-rabbitmq-f36f2edd9429200fbd18eeecfbba4b5fe891f26d.tar.gz
ansible-rabbitmq-f36f2edd9429200fbd18eeecfbba4b5fe891f26d.tar.zst
ansible-rabbitmq-f36f2edd9429200fbd18eeecfbba4b5fe891f26d.zip
Updated example playbook as part of code cleanup #10
Signed-off-by: Larry Smith Jr <mrlesmithjr@gmail.com>
Diffstat (limited to 'playbook.yml')
-rw-r--r--playbook.yml25
1 files changed, 6 insertions, 19 deletions
diff --git a/playbook.yml b/playbook.yml
index 1968320..4936577 100644
--- a/playbook.yml
+++ b/playbook.yml
@@ -1,25 +1,12 @@
1--- 1---
2- hosts: all 2- hosts: rabbitmq_cluster
3 become: true
4 vars: 3 vars:
5 pri_domain_name: 'test.vagrant.local' 4 etc_hosts_add_all_hosts: true
6 roles: 5 etc_hosts_pri_dns_name: '{{ pri_domain_name }}'
7 tasks: 6 pri_domain_name: 'vagrant.local'
8 - name: updating /etc/hosts
9 lineinfile:
10 dest: /etc/hosts
11 regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}"
12 line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}"
13 state: present
14 with_items: "{{ groups['all'] }}"
15
16- hosts: all
17 become: true
18 vars:
19 pri_domain_name: 'test.vagrant.local'
20 rabbitmq_config_ha: true
21 rabbitmq_enable_clustering: true 7 rabbitmq_enable_clustering: true
22 rabbitmq_master: 'node0' 8 rabbitmq_master: "{{ groups['rabbitmq_cluster'][0] }}"
23 roles: 9 roles:
10 - role: ansible-etc-hosts
24 - role: ansible-rabbitmq 11 - role: ansible-rabbitmq
25 tasks: 12 tasks: