-
-
Save wrabbit-revisited/0bc0f54b4b9dd5f6ce28 to your computer and use it in GitHub Desktop.
saltmine question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This gist is to reproduce a salt environment intended to: | |
1. assign a role to each minion based on its id | |
2. use the role to conditionally output the IP address of minions to a text file. Salt mine is used for this as per http://docs.saltstack.com/en/latest/topics/mine/ . | |
The salt-sandbox archive contains a vagrant environment to setup salt-master and salt-minion VMs. Extract this first. | |
The saltmine-question archive should be extracted on the saltmaster. It contains a readme describing how to reproduce the environment. | |
The correct roles appear to be assigned to the minion, but the salt mine doesn't seem to work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
meh.. when i startup the VMs the salt-minion and salt-master services are both launched automatically. Then i run the following on the master:
sudo salt 'minion01' pillar.items
and it ignores roles.yaml. The /srv/modules/pillar/roles.py is not compiled. So i stop the salt-master service and start it up in the foreground with:
sudo salt-master -l debug
then try to print the pillar.items again. This time it compiles roles.py and the roles are output. Strange.