aboutsummaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
authorLarry Smith Jr <mrlesmithjr@gmail.com>2017-05-20 21:19:34 -0400
committerLarry Smith Jr <mrlesmithjr@gmail.com>2017-05-20 21:19:34 -0400
commita67dde50f26e0f76d91f0744e8e8341dac95dae2 (patch)
tree2971e931788eddf51b9ec71ac063bfb951215d0c /README.md
parentf36f2edd9429200fbd18eeecfbba4b5fe891f26d (diff)
downloadansible-rabbitmq-a67dde50f26e0f76d91f0744e8e8341dac95dae2.tar.gz
ansible-rabbitmq-a67dde50f26e0f76d91f0744e8e8341dac95dae2.tar.zst
ansible-rabbitmq-a67dde50f26e0f76d91f0744e8e8341dac95dae2.zip
Cleaned up code as part of issue #10enhancements/issues-9-10-11
Signed-off-by: Larry Smith Jr <mrlesmithjr@gmail.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md92
1 files changed, 17 insertions, 75 deletions
diff --git a/README.md b/README.md
index 99c019d..b3b03ad 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
1Role Name 1Role Name
2========= 2=========
3 3
4Installs rabbitmq https://www.rabbitmq.com/ (Configurable...HA and Clustering ready) 4An [Ansible] role to install/configure [RabbitMQ]
5 5
6Build Status 6Build Status
7------------ 7------------
@@ -11,67 +11,30 @@ Build Status
11Requirements 11Requirements
12------------ 12------------
13 13
14Ensure hostnames are resolvable prior to clustering...either update /etc/hosts or ensure DNS is working. 14Ensure hostnames are resolvable prior to clustering...either update /etc/hosts
15or ensure DNS is working.
15 16
16Vagrant 17Vagrant
17------- 18-------
18 19
19Spin up a 3 node HA Cluster for testing... 20Spin up a 3 node HA Cluster for testing...
20Install Ansible role on your host: 21Install Ansible role on your host:
21```` 22```
22sudo ansible-galaxy install -r requirements.yml -f 23sudo ansible-galaxy install -r requirements.yml -f
23```` 24```
24Now spin up your environment... 25Now spin up your environment...
25```` 26```
26vagrant up 27vagrant up
27```` 28```
28When you are done testing, tear it all down... 29When you are done testing, tear it all down...
29```` 30```
30./cleanup.sh 31./cleanup.sh
31```` 32```
32 33
33Role Variables 34Role Variables
34-------------- 35--------------
35 36
36```` 37[Role Defaults](./defaults/main.yml)
37---
38# defaults file for ansible-rabbitmq
39rabbitmq_config_ha: false #defines if rabbitmq ha should be configured...define here or in group_vars/group
40rabbitmq_enable_clustering: false #defines if setting up a rabbitmq cluster...define here or in group_vars/group
41rabbitmq_erlang_cookie: 'LSKNKBELKPSTDBBCHETL' #define erlang cookie for cluster...define here or in group_vars/group
42rabbitmq_erlang_cookie_file: '/var/lib/rabbitmq/.erlang.cookie'
43rabbitmq_config:
44 - queue_name: logstash
45 durable: true
46 exchange_name: logstash
47 type: direct
48 routing_key: logstash
49 tags: 'ha-mode=all,ha-sync-mode=automatic'
50rabbitmq_debian_repo: 'deb http://www.rabbitmq.com/debian/ testing main'
51rabbitmq_debian_repo_key: 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc'
52rabbitmq_master: [] #defines the inventory host that should be considered master...define here or in group_vars/group
53rabbitmq_redhat_repo_key: 'https://www.rabbitmq.com/rabbitmq-signing-key-public.asc'
54rabbitmq_redhat_package: 'rabbitmq-server-{{ rabbitmq_redhat_version }}-1.noarch.rpm'
55rabbitmq_redhat_url: 'http://www.rabbitmq.com/releases/rabbitmq-server/v{{ rabbitmq_redhat_version }}'
56rabbitmq_redhat_version: '3.6.1'
57rabbitmq_users: #define admin user to create in order to login to WebUI
58 - name: rabbitmqadmin
59 password: rabbitmqadmin
60 vhost: /
61 configure_priv: '.*'
62 read_priv: '.*'
63 write_priv: '.*'
64 tags: 'administrator' #define comma separated list of tags to assign to user....management,policymaker,monitoring,administrator...required for management plugin. https://www.rabbitmq.com/management.html
65````
66
67example...
68group_vars/rabbitmq-cluster-nodes
69````
70---
71rabbitmq_enable_clustering: true
72rabbitmq_config_ha: false
73rabbitmq_master: ans-test-1
74````
75 38
76Dependencies 39Dependencies
77------------ 40------------
@@ -81,33 +44,7 @@ None
81Example Playbook 44Example Playbook
82---------------- 45----------------
83 46
84```` 47[Example Playbook](./playbook.yml)
85---
86- hosts: all
87 become: true
88 vars:
89 - pri_domain_name: 'test.vagrant.local'
90 roles:
91 tasks:
92 - name: updating /etc/hosts
93 lineinfile:
94 dest: /etc/hosts
95 regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}"
96 line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}"
97 state: present
98 with_items: "{{ groups['all'] }}"
99
100- hosts: all
101 become: true
102 vars:
103 - rabbitmq_config_ha: true
104 - rabbitmq_enable_clustering: true
105 - pri_domain_name: 'test.vagrant.local'
106 - rabbitmq_master: 'node0'
107 roles:
108 - role: ansible-rabbitmq
109 tasks:
110````
111 48
112License 49License
113------- 50-------
@@ -118,6 +55,11 @@ Author Information
118------------------ 55------------------
119 56
120Larry Smith Jr. 57Larry Smith Jr.
121- @mrlesmithjr 58- [@mrlesmithjr]
122- http://everythingshouldbevirtual.com 59- http://everythingshouldbevirtual.com
123- mrlesmithjr [at] gmail.com 60- mrlesmithjr [at] gmail.com
61
62[@mrlesmithjr]: <https://www.twitter.com/mrlesmithjr>
63
64[Ansible]: <https://www.ansible.com>
65[RabbitMQ]: <https://www.rabbitmq.com/>