You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- for route in `echo ${additional_routes} | tr ',' ' '`; do echo "push \"route $${route} 255.255.255.255\"" >> /etc/openvpn/server.conf;done
13
15
- sed -i 's/\(ExecStartPost=.*chmod.*$\)/ExecStartPost=\/bin\/chown -R nobody:nogroup \/etc\/openvpn\n\1\n/g' /etc/systemd/system/get-openvpn-certs.service
14
16
- systemctl daemon-reload
15
17
- systemctl start get-openvpn-certs
16
18
- systemctl restart openvpn@server
17
19
- systemctl restart iptables
20
+
- if [ ${assign_eip} = 'true' ]; then for eip in `aws ec2 describe-tags --region=${region} --filters "Name=resource-type,Values=elastic-ip" "Name=value,Values=${stack_item_label}" | jq -r '.Tags[].ResourceId'`; do if [ `aws ec2 describe-addresses --allocation-id $${eip} --region=${region} | jq -r '.Addresses[].InstanceId'` = 'null' ]; then echo "$${eip} is available, assigning it to current instance";aws ec2 associate-address --instance-id "$${INSTANCE_ID}" --allocation-id $${eip} --region=${region};else echo "$${eip} is taken";fi; done;fi
18
21
19
22
output : { all : '| tee -a /var/log/cloud-init-output.log'}
0 commit comments