Last active
January 23, 2017 17:25
-
-
Save burythehammer/081d6ee11cc33c2f4c4729ae67622f5b to your computer and use it in GitHub Desktop.
Running Goss on a remote server
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
# run this file to install goss onto a remote target and run a test script on it | |
# example usage: | |
# ./goss-test.sh 34.248.91.167 | |
TARGET='centos@'$1 # change user as required - this is for centos | |
SSH_KEY_PATH=~/.ssh/aws # change ssh key as required | |
ssh -t -t -i $SSH_KEY_PATH $TARGET 'curl -fsSL https://goss.rocks/install | sudo sh' | |
scp ./goss.json $TARGET:~/goss.yaml | |
ssh -t -t -i $SSH_KEY_PATH $TARGET 'goss validate' |
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
{ | |
"package": { | |
"etcd": { | |
"installed": true, | |
"versions": [ | |
"2.3.7" | |
] | |
} | |
}, | |
"service": { | |
"etcd": { | |
"enabled": true, | |
"running": true | |
} | |
}, | |
"user": { | |
"centos": { | |
"exists": true, | |
"uid": 1000, | |
"gid": 1000, | |
"groups": [ | |
"adm", | |
"centos", | |
"systemd-journal", | |
"wheel" | |
], | |
"home": "/home/centos", | |
"shell": "/bin/bash" | |
}, | |
"etcd": { | |
"exists": true, | |
"uid": 995, | |
"gid": 992, | |
"groups": [ | |
"etcd" | |
], | |
"home": "/var/lib/etcd", | |
"shell": "/sbin/nologin" | |
} | |
}, | |
"group": { | |
"centos": { | |
"exists": true, | |
"gid": 1000 | |
}, | |
"etcd": { | |
"exists": true, | |
"gid": 992 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment