Jeepyb User | dd14e0b | 2017-02-28 15:19:32 +0000 | [diff] [blame] | 1 | #!/bin/bash -x |
| 2 | exec > >(tee -i /tmp/"$(basename "$0" .sh)"_"$(date '+%Y-%m-%d_%H-%M-%S')".log) 2>&1 |
| 3 | |
| 4 | # Refresh salt master config |
| 5 | salt -C 'I@salt:master' state.sls salt.master,reclass |
| 6 | |
| 7 | # Refresh minion's pillar data |
| 8 | salt '*' saltutil.refresh_pillar |
| 9 | |
| 10 | # Sync all salt resources |
| 11 | salt '*' saltutil.sync_all |
| 12 | |
| 13 | sleep 5 |
| 14 | |
Mateusz Matuszkowiak | 5bf311e | 2018-03-21 14:39:42 +0100 | [diff] [blame] | 15 | # Run for CA generation. CA will be generated right after 'salt.minion' state. |
| 16 | salt -C 'I@salt:master' state.sls salt.minion.ca |
| 17 | |
Jeepyb User | dd14e0b | 2017-02-28 15:19:32 +0000 | [diff] [blame] | 18 | # Bootstrap all nodes |
| 19 | salt "*" state.sls linux,openssh,salt.minion,ntp,rsyslog |