merge Add Router ID with environment KEEPALIVED_ROUTER_ID #16
This commit is contained in:
commit
743eee1f61
|
@ -16,3 +16,5 @@ KEEPALIVED_VIRTUAL_IPS:
|
|||
- 192.168.1.232
|
||||
|
||||
KEEPALIVED_NOTIFY: /container/service/keepalived/assets/notify.sh
|
||||
|
||||
KEEPALIVED_ROUTER_ID: 51
|
||||
|
|
|
@ -10,7 +10,7 @@ vrrp_instance VI_1 {
|
|||
}
|
||||
|
||||
state BACKUP
|
||||
virtual_router_id 51
|
||||
virtual_router_id {{ KEEPALIVED_ROUTER_ID }}
|
||||
priority {{ KEEPALIVED_PRIORITY }}
|
||||
nopreempt
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ if [ ! -e "$FIRST_START_DONE" ]; then
|
|||
#
|
||||
# bootstrap config
|
||||
#
|
||||
sed -i "s|{{ KEEPALIVED_ROUTER_ID }}|$KEEPALIVED_ROUTER_ID|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||
sed -i "s|{{ KEEPALIVED_INTERFACE }}|$KEEPALIVED_INTERFACE|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||
sed -i "s|{{ KEEPALIVED_PRIORITY }}|$KEEPALIVED_PRIORITY|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||
sed -i "s|{{ KEEPALIVED_PASSWORD }}|$KEEPALIVED_PASSWORD|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||
|
|
Loading…
Reference in New Issue