blob: 74e376e98e05df4f76d81b8aee413f0b6f5979c4 [file] [log] [blame]
#!/bin/bash -xe
# Wait for salt-master and salt-minion to wake up after restart
# since we just perform 'reboot.sh'
salt-call --timeout=120 test.ping
SALT_OPTS="-l debug -t 10 --retcode-passthrough --no-color"
salt-call ${SALT_OPTS} saltutil.clear_cache
salt-call ${SALT_OPTS} saltutil.refresh_pillar
salt-call ${SALT_OPTS} saltutil.sync_all
salt-call ${SALT_OPTS} reclass.validate_pillar
salt-call ${SALT_OPTS} state.sls salt.minion.ca
salt-call ${SALT_OPTS} state.sls salt
salt-call ${SALT_OPTS} state.sls linux.system.repo,linux.system.package,linux.system.directory,linux.system.file,linux.system.config
salt-call ${SALT_OPTS} state.sls docker.host
salt-call ${SALT_OPTS} state.sls docker exclude=docker.client.registry
sleep 120
salt-call ${SALT_OPTS} state.sls linux.network
salt-call ${SALT_OPTS} state.sls nginx
# Duplicate of ubuntu_info.sh
mkdir -p /var/log/bootstrap_logs/ ; pushd /var/log/bootstrap_logs/
# Drop some reclass info,if available
if [[ $(which salt-key) ]] ; then
for node in $(salt-key -l acc | grep -v 'Accepted Keys:') ; do
salt ${node} pillar.data --out=json > ${node}.pillardata.json || true
reclass -n ${node} -o json > ${node}.reclass.json || true
done
fi
popd