File tree Expand file tree Collapse file tree 8 files changed +98
-3
lines changed
activemq-artemis/cluster/templates Expand file tree Collapse file tree 8 files changed +98
-3
lines changed Original file line number Diff line number Diff line change @@ -144,9 +144,9 @@ under the License.
144144 <global-max-messages >-1</global-max-messages >
145145 <!-- Cluster Configuration: Connectors and Cluster-Connections -->
146146 <connectors >
147- {% for name , url in connectors .items () %}
148- <connector name =" {{ name }}" >{{ url }}</connector >
149- {% endfor %}
147+ {% for name , url in connectors .items () %}
148+ <connector name =" {{ name }}" >{{ url }}</connector >
149+ {% endfor %}
150150 </connectors >
151151
152152 <ha-policy >
Original file line number Diff line number Diff line change 1+ [defaults]
2+ callbacks_enabled = profile_tasks
Original file line number Diff line number Diff line change 1+ ---
2+ - name : Configure Keepalived on Master and Slave servers
3+ hosts : all
4+ become : true
5+ vars_files :
6+ - vars.yml
7+
8+ tasks :
9+ - name : Ensure Keepalived is installed
10+ ansible.builtin.package :
11+ name : keepalived
12+ state : present
13+
14+ - name : Generate Keepalived configuration for master
15+ ansible.builtin.template :
16+ src : templates/master.conf.j2
17+ dest : /etc/keepalived/keepalived.conf
18+ owner : root
19+ group : root
20+ mode : 0644
21+ when : " 'master' in group_names"
22+
23+ - name : Generate Keepalived configuration for slaves
24+ ansible.builtin.template :
25+ src : templates/slave.conf.j2
26+ dest : /etc/keepalived/keepalived.conf
27+ owner : root
28+ group : root
29+ mode : 0644
30+ when : " 'slave' in group_names"
31+
32+ - name : Restart Keepalived service
33+ ansible.builtin.service :
34+ name : keepalived
35+ state : restarted
Original file line number Diff line number Diff line change 1+ ---
2+ - name : Install Keepalived on multiple OS families
3+ hosts : all
4+ become : true
5+ tasks :
6+ - name : Install Keepalived on Debian/Ubuntu systems
7+ ansible.builtin.package :
8+ name : keepalived
9+ state : present
10+ when : ansible_facts['os_family'] == "Debian"
11+
12+ - name : Install Keepalived on Red Hat/CentOS systems
13+ ansible.builtin.package :
14+ name : keepalived
15+ state : present
16+ when : ansible_facts['os_family'] == "RedHat"
Original file line number Diff line number Diff line change 1+ [master]
2+ rockylinux ansible_host =142.93.56.4 ansible_user =root
3+
4+ [slave]
5+ debian ansible_host =157.245.130.56 ansible_user =root
6+ ubuntu ansible_host =134.209.77.220 ansible_user =root
Original file line number Diff line number Diff line change 1+ vrrp_instance VI_1 {
2+ state MASTER
3+ interface {{ interface }}
4+ virtual_router_id {{ virtual_router_id }}
5+ priority {{ master_priority }}
6+ advert_int {{ advert_int }}
7+ authentication {
8+ auth_type PASS
9+ auth_pass {{ auth_pass }}
10+ }
11+ virtual_ipaddress {
12+ {{ virtual_ipaddress }}
13+ }
14+ }
Original file line number Diff line number Diff line change 1+ vrrp_instance VI_1 {
2+ state BACKUP
3+ interface {{ interface }}
4+ virtual_router_id {{ virtual_router_id }}
5+ priority {{ slave_priority }}
6+ advert_int {{ advert_int }}
7+ authentication {
8+ auth_type PASS
9+ auth_pass {{ auth_pass }}
10+ }
11+ virtual_ipaddress {
12+ {{ virtual_ipaddress }}
13+ }
14+ }
Original file line number Diff line number Diff line change 1+ # vars.yml
2+ interface : eth0
3+ virtual_router_id : 51
4+ auth_pass : 1111
5+ virtual_ipaddress : 192.168.1.100
6+ master_priority : 100
7+ slave_priority : 80
8+ advert_int : 1
You can’t perform that action at this time.
0 commit comments