Forked from maxcnunes/update-coreos-cloud-config.sh
Created
December 7, 2015 08:21
-
-
Save NeMO84/b97be5874968796a06a2 to your computer and use it in GitHub Desktop.
Update coreos cloud config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SERVER_IP=<MY_SERVER_IP> | |
# copy cloud-config.yml to the server | |
scp cloud-config.yml core@$SERVER_IP:~/ | |
# validate cloud-config file | |
ssh core@$SERVER_IP "coreos-cloudinit -validate --from-file ~/cloud-config.yml" | |
if [[ $? == "0" ]]; then | |
echo | |
echo "Valid configuration" | |
echo " Connect to the server and execute it as root user: " | |
echo " coreos-cloudinit --from-file /home/core/cloud-config.yml" | |
else | |
echo | |
echo "Invalid configuration" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment