diff --git a/README.md b/README.md index 87a2433..f8f801a 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ keepalived_instances: vrouter_id: '{{ keepalived_vrouter_id }}' notify: '{{ keepalived_notify_script }}' priority: '{{ keepalived_inst_priority }}' - nopreempt: True + nopreempt: False v_addr: - '{{ keepalived_floating_ip1 }}' track_script: diff --git a/defaults/main.yml b/defaults/main.yml index 888fdb3..2e7175d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -24,7 +24,8 @@ keepalived_script1_check: '/bin/pidof {{ keepalived_service_to_check }}' keepalived_instance1_name: 'VRRP_1' keepalived_interface1_name: '{{ ansible_default_ipv4.interface }}' keepalived_initial_state: 'MASTER' -keepalived_inst_priority: 100 +keepalived_inst_priority: 101 +keepalived_script_weight: 2 keepalived_vrouter_id: 51 keepalived_non_local_bind: True @@ -44,7 +45,7 @@ keepalived_scripts: # In seconds interval: 2 # Priority increment - weight: 2 + weight: '{{ keepalived_script_weight }}' keepalived_instances: - name: '{{ keepalived_instance1_name }}' @@ -53,7 +54,7 @@ keepalived_instances: vrouter_id: '{{ keepalived_vrouter_id }}' notify: '{{ keepalived_notify_script }}' priority: '{{ keepalived_inst_priority }}' - nopreempt: True + nopreempt: False v_addr: - '{{ keepalived_floating_ip1 }}' track_script: