Personal Vagrantfile for SaltStack Development in CentOS 7.
-
Run the following commands in a terminal. Git, VirtualBox and Vagrant must already be installed.
git clone git@github.com:abednarik/saltdev-centos.git cd saltdev-centos
-
Edit Vagrantfile to update your local salt repository path.and launch centos instance
vagrant up
-
Finally login as vagrant user and install salt using pip in editable module
vagrant ssh sudo su - cd salt pip install -e .
-
For developing and debugging I use tmux to run salt-master and salt-minion in foreground in error mode [ I mostly add log.error when I want to debug something ]
sudo salt-master -l error sudo salt-minion -l error
-
Check if everything went fine
salt '*' test.ping
There is a placeholder state in /srv/salt called default.sls. Just put the content you want to test and run
```
salt 'salt' state.apply default
```
This is heavily based on salt-vagrant-demo following official Salt Development Docs