diff options
author | Christian Pointner <equinox@spreadspace.org> | 2018-12-31 00:21:52 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2018-12-31 00:21:52 +0100 |
commit | 5dd6a74cd24f370576b0f7f06c4775f540cd9418 (patch) | |
tree | 19acc0952c4751923fad9ad129c13defc23f7df9 /install.sh | |
parent | added mixer vlan to router (diff) |
finalized usb-installer and added ele-media config
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/install.sh b/install.sh new file mode 100755 index 00000000..d60cc56e --- /dev/null +++ b/install.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then + echo "$0 <hostname> <distro> <codename>" + exit 1 +fi +name=$1 +shift +distro=$1 +shift +codename=$1 +shift + +cd "${BASH_SOURCE%/*}" +source common/utils.sh +ansible_variable__get env_group "$name" || exit 1 +vault_environment__set "$env_group" || exit 1 + +echo "installing $name with $distro/$codename in environment '$env_group'" +echo "" + +echo "########## clearing old ssh host keys #########" +./remove-known-host.sh "$name" +echo "" + +echo "######## running the install playbook ########" +exec ansible-playbook -e "hostname=$name" -e "install_distro=$distro" -e "install_codename=$codename" -e "hostenv=$env_group" $@ "$env_group/$(basename "$0" .sh).yml" |