From 8996741419c0b096e391e30205acc5abe0e37b81 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Wed, 17 Jul 2019 22:48:57 +0800 Subject: [PATCH] minor fix in role:ex-lb --- roles/ex-lb/ex-lb.yml | 2 -- roles/ex-lb/templates/keepalived-backup.conf.j2 | 4 +++- roles/ex-lb/templates/keepalived-master.conf.j2 | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/roles/ex-lb/ex-lb.yml b/roles/ex-lb/ex-lb.yml index ac6b3eb..e351ace 100644 --- a/roles/ex-lb/ex-lb.yml +++ b/roles/ex-lb/ex-lb.yml @@ -1,5 +1,3 @@ - hosts: ex-lb roles: - - { role: chrony, when: "groups['chrony']|length > 0" } - - prepare - ex-lb diff --git a/roles/ex-lb/templates/keepalived-backup.conf.j2 b/roles/ex-lb/templates/keepalived-backup.conf.j2 index 5bfd83b..9b77f93 100644 --- a/roles/ex-lb/templates/keepalived-backup.conf.j2 +++ b/roles/ex-lb/templates/keepalived-backup.conf.j2 @@ -1,9 +1,11 @@ global_defs { router_id lb-backup-{{ inventory_hostname }} + script_user root + enable_script_security } vrrp_script check-haproxy { - script "killall -0 haproxy" + script "/usr/bin/killall -0 haproxy" interval 5 weight -60 } diff --git a/roles/ex-lb/templates/keepalived-master.conf.j2 b/roles/ex-lb/templates/keepalived-master.conf.j2 index 6226c55..3b8be47 100644 --- a/roles/ex-lb/templates/keepalived-master.conf.j2 +++ b/roles/ex-lb/templates/keepalived-master.conf.j2 @@ -1,9 +1,11 @@ global_defs { router_id lb-master-{{ inventory_hostname }} + script_user root + enable_script_security } vrrp_script check-haproxy { - script "killall -0 haproxy" + script "/usr/bin/killall -0 haproxy" interval 5 weight -60 }