complex-bash-env
This commit is contained in:
parent
46b1825a10
commit
0fc4b060e3
|
@ -23,16 +23,16 @@ if [ ! -e "$FIRST_START_DONE" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# unicast peers
|
# unicast peers
|
||||||
for peer in $(complex-bash-env iterate "${KEEPALIVED_UNICAST_PEERS}")
|
for peer in $(complex-bash-env iterate KEEPALIVED_UNICAST_PEERS)
|
||||||
do
|
do
|
||||||
sed -i "s|{{ keepalived_unicast_peers }}|${peer}\n {{ keepalived_unicast_peers }}|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i "s|{{ keepalived_unicast_peers }}|${!peer}\n {{ keepalived_unicast_peers }}|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
done
|
done
|
||||||
sed -i "/{{ keepalived_unicast_peers }}/d" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i "/{{ keepalived_unicast_peers }}/d" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
|
|
||||||
# virtual ips
|
# virtual ips
|
||||||
for vip in $(complex-bash-env iterate "${KEEPALIVED_VIRTUAL_IPS}")
|
for vip in $(complex-bash-env iterate KEEPALIVED_VIRTUAL_IPS)
|
||||||
do
|
do
|
||||||
sed -i "s|{{ keepalived_virtual_ips }}|${vip}\n {{ keepalived_virtual_ips }}|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i "s|{{ keepalived_virtual_ips }}|${!vip}\n {{ keepalived_virtual_ips }}|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
done
|
done
|
||||||
sed -i "/{{ keepalived_virtual_ips }}/d" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i "/{{ keepalived_virtual_ips }}/d" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue