Skip to content

Instantly share code, notes, and snippets.

@wrabbit-revisited
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wrabbit-revisited/0bc0f54b4b9dd5f6ce28 to your computer and use it in GitHub Desktop.
Save wrabbit-revisited/0bc0f54b4b9dd5f6ce28 to your computer and use it in GitHub Desktop.
saltmine question
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.
@wrabbit-revisited
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment