Skip to content

Commit

Permalink
only reload if config has changed
Browse files Browse the repository at this point in the history
a restart is not necessary
  • Loading branch information
gurubert committed Nov 18, 2020
1 parent 709f5aa commit 4cc602b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
8 changes: 8 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@
# service:
# name: "{{ keepalived_service_name }}"
# state: restarted
- name: reload keepalived
command: "systemctl reload {{ keepalived_service_name }}"
tags:
- skip_ansible_lint
#- name: reload keepalived
# service:
# name: "{{ keepalived_service_name }}"
# state: reloaded
22 changes: 11 additions & 11 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
tags:
- keepalived-config
notify:
- restart keepalived
- reload keepalived

- name: Check that daemon options file exists
stat:
Expand Down Expand Up @@ -104,7 +104,7 @@
tags:
- keepalived-config
notify:
- restart keepalived
- reload keepalived

- name: Dropping the general notification scripts
copy:
Expand All @@ -116,7 +116,7 @@
tags:
- keepalived-config
notify:
- restart keepalived
- reload keepalived

- name: Dropping the notification scripts for switching to master
copy:
Expand All @@ -128,7 +128,7 @@
tags:
- keepalived-config
notify:
- restart keepalived
- reload keepalived

- name: Dropping the notification scripts for switching to backup
copy:
Expand All @@ -140,7 +140,7 @@
tags:
- keepalived-config
notify:
- restart keepalived
- reload keepalived

- name: Dropping the notification scripts for failures
copy:
Expand All @@ -152,7 +152,7 @@
tags:
- keepalived-config
notify:
- restart keepalived
- reload keepalived

- name: Dropping the general notification scripts (instances)
copy:
Expand All @@ -164,7 +164,7 @@
tags:
- keepalived-config
notify:
- restart keepalived
- reload keepalived

- name: Dropping the notification scripts for switching to master (instances)
copy:
Expand All @@ -176,7 +176,7 @@
tags:
- keepalived-config
notify:
- restart keepalived
- reload keepalived

- name: Dropping the notification scripts for switching to backup (instances)
copy:
Expand All @@ -188,7 +188,7 @@
tags:
- keepalived-config
notify:
- restart keepalived
- reload keepalived

- name: Dropping the notification scripts for stopping vrrp (instances)
copy:
Expand All @@ -200,7 +200,7 @@
tags:
- keepalived-config
notify:
- restart keepalived
- reload keepalived

- name: Dropping the notification scripts for failures (instances)
copy:
Expand All @@ -212,7 +212,7 @@
tags:
- keepalived-config
notify:
- restart keepalived
- reload keepalived

- name: Make directory for keepalived's systemd overrides
file:
Expand Down

0 comments on commit 4cc602b

Please sign in to comment.