- Setup minion conf
# /etc/salt/minion
master: xxx.xxx.xxx.xxx
master_port: 4506
- Setup minion mine
/etc/salt/minion.d/mine.conf
mine_functions:
test.ping: []
network.interfaces: []
network.ip_addrs:
- ens4
mine_interval: 2
- Setup master
# /etc/salt/master
interface: xxx.xxx.xxx.xxx
publish_port: 4505
user: root
ret_port: 4506
conf_file: /etc/salt/master
pki_dir: /etc/salt/pki/master
autosign_grains_dir: /etc/salt/autosign_grains
file_roots:
base:
- /srv/salt/
- /srv/formulas/hostsfile-formula/hostsfile
reactor:
- /srv/reactor/start.sls
- Setup autosign key #also pre-configure minion with this grain /etc/salt/grains
# /etc/salt/autosign_grains/auto_accept_key
randomstringofthedead
- Setup reactor
# /srv/reactor/start.sls
base:
local.state.sls:
- tgt: '*'
- arg:
- states.init
- Setup states
# /srv/salt/states/init.sls
this_action:
cmd.run:
- name: touch /tmp/log.txt
-
Pull formula
mkdir /srv/formulas;cd /srv/formulas;git clone https://github.com/saltstack-formulas/hostsfile-formula
-
Start master with debug
salt-master --log-level=trace