Richard Felkl | d59c565 | 2018-02-08 13:14:05 +0100 | [diff] [blame] | 1 | #!/bin/bash -xe |
azvyagintsev | 6d45385 | 2018-02-26 16:56:37 +0200 | [diff] [blame] | 2 | |
azvyagintsev | 29410ee | 2018-07-12 20:02:30 +0300 | [diff] [blame] | 3 | # Wait for salt-master and salt-minion to wake up after restart |
| 4 | # since we just perform 'reboot.sh' |
| 5 | salt-call --timeout=120 test.ping |
| 6 | |
azvyagintsev | 41bc80d | 2018-07-12 13:46:56 +0300 | [diff] [blame] | 7 | SALT_OPTS="-l debug -t 10 --retcode-passthrough --no-color" |
| 8 | |
Richard Felkl | d59c565 | 2018-02-08 13:14:05 +0100 | [diff] [blame] | 9 | salt-call saltutil.refresh_pillar |
| 10 | salt-call saltutil.sync_all |
azvyagintsev | 41bc80d | 2018-07-12 13:46:56 +0300 | [diff] [blame] | 11 | |
| 12 | salt-call ${SALT_OPTS} state.sls salt |
| 13 | salt-call ${SALT_OPTS} state.sls linux.system.repo,linux.system.directory,linux.system.package |
| 14 | salt-call ${SALT_OPTS} state.sls linux.system.file |
| 15 | salt-call ${SALT_OPTS} state.sls docker.host |
| 16 | salt-call ${SALT_OPTS} state.sls docker exclude=docker.client.registry |
Richard Felkl | 4775790 | 2018-03-02 22:44:43 +0100 | [diff] [blame] | 17 | sleep 120 |
azvyagintsev | 41bc80d | 2018-07-12 13:46:56 +0300 | [diff] [blame] | 18 | salt-call ${SALT_OPTS} state.sls linux.network |
| 19 | salt-call ${SALT_OPTS} state.sls nginx |
| 20 | salt-call ${SALT_OPTS} state.sls maas.mirror |
azvyagintsev | 05e8437 | 2018-10-17 17:31:28 +0300 | [diff] [blame^] | 21 | |
| 22 | # Duplicate of ubuntu_info.sh |
| 23 | mkdir -p /var/log/bootstrap_logs/ ; pushd /var/log/bootstrap_logs/ |
| 24 | # Drop some reclass info,if available |
| 25 | if [[ $(which salt-key) ]] ; then |
| 26 | for node in $(salt-key -l acc | grep -v 'Accepted Keys:') ; do |
| 27 | salt ${node} pillar.data --out=json > ${node}.pillardata.json || true |
| 28 | reclass -n ${node} -o json > ${node}.reclass.json || true |
| 29 | done |
| 30 | fi |
| 31 | popd |