Listen for IPSEC connections in handler

Besides restarting IPSEC, doing whack --listen forces connections
to listen.
This commit is contained in:
Juan Antonio Osorio Robles 2017-12-01 09:53:57 +00:00
parent e30e6c05ce
commit 6f64a500ad
2 changed files with 9 additions and 0 deletions

View File

@ -12,3 +12,7 @@
name: ipsec name: ipsec
state: restarted state: restarted
become: yes become: yes
- name: Listen for IPSEC connections
shell: ipsec whack --listen
become: yes

View File

@ -55,6 +55,7 @@
backup: yes backup: yes
notify: notify:
- Restart ipsec - Restart ipsec
- Listen for IPSEC connections
- name: Write ipsec tunnel policy for the {{ network }} network - name: Write ipsec tunnel policy for the {{ network }} network
template: template:
@ -66,6 +67,7 @@
- type == 'opportunistic' - type == 'opportunistic'
notify: notify:
- Restart ipsec - Restart ipsec
- Listen for IPSEC connections
- name: Write ipsec tunnel secrets for the {{ network }} network - name: Write ipsec tunnel secrets for the {{ network }} network
template: template:
@ -77,6 +79,7 @@
- type != 'opportunistic' - type != 'opportunistic'
notify: notify:
- Restart ipsec - Restart ipsec
- Listen for IPSEC connections
- name: Write ipsec tunnel configuration for the {{ network }} network - name: Write ipsec tunnel configuration for the {{ network }} network
template: template:
@ -95,6 +98,7 @@
when: current_vip.ip != '' and type != 'opportunistic' when: current_vip.ip != '' and type != 'opportunistic'
notify: notify:
- Restart ipsec - Restart ipsec
- Listen for IPSEC connections
- name: Write VIP ipsec tunnel configuration for the {{ network }} network - name: Write VIP ipsec tunnel configuration for the {{ network }} network
template: template:
@ -104,6 +108,7 @@
when: current_vip.ip != '' and type != 'opportunistic' when: current_vip.ip != '' and type != 'opportunistic'
notify: notify:
- Restart ipsec - Restart ipsec
- Listen for IPSEC connections
- include_tasks: resource-agent.yml - include_tasks: resource-agent.yml
when: when: