kayobe/provision-seed.sh
Mark Goddard cbd6fcc522 Make SSH keys configurable
Defaults to using stack/.ssh/id_rsa on the control host
2017-02-16 10:44:31 +00:00

35 lines
905 B
Bash
Executable File

#!/bin/bash
set -e
function run_playbook {
KAYOBE_CONFIG_PATH=${KAYOBE_CONFIG_PATH:-/etc/kayobe}
# Ansible fails silently if the inventory does not exist.
test -e ${KAYOBE_CONFIG_PATH}/inventory
ansible-playbook \
-i ${KAYOBE_CONFIG_PATH}/inventory \
-e @${KAYOBE_CONFIG_PATH}/dns.yml \
-e @${KAYOBE_CONFIG_PATH}/globals.yml \
-e @${KAYOBE_CONFIG_PATH}/kolla.yml \
-e @${KAYOBE_CONFIG_PATH}/networks.yml \
-e @${KAYOBE_CONFIG_PATH}/network-allocation.yml \
-e @${KAYOBE_CONFIG_PATH}/ntp.yml \
-e @${KAYOBE_CONFIG_PATH}/seed-vm.yml \
-e @${KAYOBE_CONFIG_PATH}/ssh.yml \
-e @${KAYOBE_CONFIG_PATH}/swift.yml \
$@
}
function provision_seed_vm {
run_playbook ansible/seed-vm.yml
}
###########################################################
# Main
function main {
provision_seed_vm
}
main $*