docker run --rm -d \
-v $(pwd)/master.d:/etc/salt/master.d \
-h dev-salt-master \
--name dev-salt-master \
simplyadrian/allsalt:debian_master_2017.7.2
docker exec -it dev-salt-master bash
docker run --rm -d \
-v $(pwd)/minion.d:/etc/salt/minion.d \
-h dev-ubuntu-minion \
--name dev-ubuntu-minion \
simplyadrian/allsalt:ubuntu_minion_2017.7.2
docker exec -it dev-ubuntu-minion bash
salt-key
salt-key -A -y
salt \* test.ping
salt dev-ubuntu-minion pkg.install vim refresh=True
salt dev-ubuntu-minion pkg.install python-pyinotify
From the minion, create a file named /etc/important_file
and add some simple content:
echo "important_config: True" > /etc/important_file
docker restart dev-salt-master
docker restart dev-ubuntu-minion
salt-run state.event pretty=true
Edit /etc/important_file:
vi /etc/important_file
# edit it and save
You should see an event like this:
salt/beacon/dev-ubuntu-minion/inotify//etc/important_file {
"_stamp": "2017-11-26T18:55:06.015431",
"change": "IN_IGNORED",
"id": "dev-ubuntu-minion",
"path": "/etc/important_file"
}