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