add ifstated role and enable it on proxy group
This commit is contained in:
parent
397a686495
commit
0a8c59335a
5 changed files with 29 additions and 0 deletions
|
@ -37,6 +37,8 @@ network_carp_interfaces:
|
|||
pass: "{{ carp154_pass }}"
|
||||
advskew: "{{ carp154_advskew }}"
|
||||
|
||||
ifstated_config: ifstated-proxy.conf
|
||||
|
||||
firewall_raw:
|
||||
- pass quick proto carp
|
||||
firewall_in:
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
roles:
|
||||
- base
|
||||
- ifstated
|
||||
- nginx/server
|
||||
- role: nginx/site
|
||||
site: foo.sh
|
||||
|
|
6
roles/ifstated/files/ifstated-proxy.conf
Normal file
6
roles/ifstated/files/ifstated-proxy.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
# flush routes when external carp goes up
|
||||
if carp153.link.up
|
||||
run 'route -q flush ; route add default $(cat /etc/mygate)'
|
||||
if carp154.link.up
|
||||
run 'route -q flush ; route add default $(cat /etc/mygate)'
|
5
roles/ifstated/handlers/main.yml
Normal file
5
roles/ifstated/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: restart ifstated
|
||||
service:
|
||||
name: ifstated
|
||||
state: restarted
|
15
roles/ifstated/tasks/main.yml
Normal file
15
roles/ifstated/tasks/main.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
- name: copy ifstated config
|
||||
copy:
|
||||
dest: /etc/ifstated.conf
|
||||
src: "{{ ifstated_config }}"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: restart ifstated
|
||||
|
||||
- name: enable ifstated
|
||||
service:
|
||||
name: ifstated
|
||||
state: started
|
||||
enabled: true
|
Loading…
Add table
Add a link
Reference in a new issue