-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to reference pillar files? #14980
Comments
Just to make clear, what our intention is. Is there something like We would like to be able to use the git-pillar to query necessary data from it like tags, branches, files etc. |
You don't reference files in pillars, you reference the data in lists and
|
Thank you for your kind response. Unfortunately, what do we do if we have a template snippet or other important files somewhere in the pillars directory? How can we access those in our sls files? Furthermore, how to use git (capabilities provided by http://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.git_pillar.html are quite limited) on those pillar directories? |
In this one that a friend of mine wrote, you add the ssh public and private keys to pillars, we then drop the pillar into a file here. https://github.com/mparker1001/loadtester-salt/blob/master/loadmaster/init.sls#L91 So you can reference your stuff with yaml blocks or you can cycle through the data like he does in the top of the init.sls file. |
Thank you again. I will into it tomorrow and provide some feedback. |
Alright. I had a look at your friend's approach. It seems doable this way; so, thank you and your friend again. However, I dislike this solution because it feels like a dirty work-around. Is there no Salty way to do it? |
The issue with this, is pillar data is considered sensitive, and is restricted based on the minion in question. If minions were able to just reference files in that directory, it would be a pretty big security issue, because they could get at files that they're not supposed to. Instead, if you need to fill the contents of a file with something from pillar, define it in the pillar for that minion, and then use We will not be adding support for direct |
Next issue wanting a solution to this: #18406 |
As far as I my knowledge goes, we can identify files the following ways:
salt://my/file
<<< that is below/srv/salt/
on the master/my/file
<<< that is below/
on the mininionHow can we reference files under
/srv/pillar/
?Would it make a difference when using git-pillars?
I could not find any thing in the docs regarding this.
The text was updated successfully, but these errors were encountered: