ansible-roles/evobackup-client/handlers/main.yml
Patrick Marchand 0b4095d8dd
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
bkctld restart works better than bkctld start
a simple start will fail if the jail is already started, there is potential for a race condition.
2019-12-19 10:30:58 -05:00

16 lines
621 B
YAML

---
- name: restart minifirewall
command: /etc/init.d/minifirewall restart
register: minifirewall_init_restart
failed_when: "'starting IPTables rules is now finish : OK' not in minifirewall_init_restart.stdout"
changed_when: "'starting IPTables rules is now finish : OK' in minifirewall_init_restart.stdout"
- name: 'created new jail'
command: "bkctld restart {{ evolinux_hostname }}"
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
- name: 'jail updated'
command: "bkctld restart {{ evolinux_hostname }}"
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
when: evobackup_client__hosts|length > 1