Comments (6)
Would it be possible for you to test your configuration under PillarStack?
GitStack is just a wrapper around PillarStack, so we need to make sure that is working first.
from gitstack-pillar.
I've updated the master config to have:
ext_pillar:
- stack: /etc/salt/stack/stack.cfg
And dropped the above files into /srv/pillar
and /etc/salt/stack/
as appropriate.
Now I see {{ pillar }}
being expanded properly in the logs:
Ignoring pillar stack template "TESTING/{u'roles': [u'a', u'b']}" ...
And the for
seems to be looping as expected - if I create roles/a.sls
then it's pillar contents ends up being processed correctly and appear when calling pillar.items
.
So it does look like a gitstack
issue I'm afraid!
from gitstack-pillar.
OK - I just managed to solve this one.
It turns out that if you have stack config and pillars in the same git repo, then you must put the git
entry before the gitstack
entry in the master ext_pillar
section:
ext_pillar:
- git:
- master http://example.com/salt.git
- gitstack:
- master http://example.com/salt.git:
- stack: _stack/stack.cfg
I'm guessing what happens is that ext_pillar
parts are processed in order, and that otherwise gitstack
runs 'before' top.sls
has been read in from the git repo, so gets an empty pillar. However top.sls
is then read in subsequently, which is why the roles defined in it do end up in the pillar by the time we call pillar.items
. Having swapped them round it all works as expected.
I'm guessing this will never have been spotted if top.sls
is local, or in a different git repo included before gitstack
?
Could you update the documentation to reflect this? (There's also a minor bug in that the configuration yaml for gitstack
in ext_pillar
is missing a colon).
from gitstack-pillar.
That makes sense. It wasn't clear to me that you were using the Git pillar. I assumed you were using the standard, built-in, pillar and I was having a very hard time understanding the issue.
from gitstack-pillar.
@mrichar1 I've added some documentation on pillar chaining. Please let me know if this looks sufficient.
https://github.com/amendlik/gitstack-pillar/blob/develop/docs/configuration.md
from gitstack-pillar.
That looks great - thanks!
from gitstack-pillar.
Related Issues (9)
- Docs Request HOT 2
- Error when using Old-Style config with list-type `stack` HOT 3
- not ready for py3 HOT 1
- ext_pillar module directory name
- Sync with Saltstack repo HOT 1
- error: "Failed to load ext_pillar ... 'Pygit2' object has no attribute 'base'" HOT 1
- Multiple Directory Search Path, Combining Multiple Pillar Git Repos HOT 7
- List of Stack config files doesn't work HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitstack-pillar.