1

Most of the examples -- and also the documentation -- of SaltStack put the states files under /srv/salt and the pillars files under /srv/pillar.

This means if I want to track the files using a source control (Mercurial or Git), I have to create two repositories.

Now, I want place the states files and the pillars files as subdirectories under /srv/salt. Or, in other words, I will get the following directory structure (after hg init on /srv/salt):

/srv/salt
  + .hg/
  + states/
  + pillars/

Will this cause any problems with SaltStack?

Or do you have a better recommendation so that I can have only one source control repository for both the states and the pillars?

pepoluan
  • 4,918
  • 3
  • 43
  • 71

1 Answers1

1

Your suggested approach will work. You will need to change the folder setting for states and pillars in the salt configuration.

Please note that salt can pull information from git repositories directly as described in this tutorial. This takes more time to setup, but it is up to you to figure out if it is worth the effort in your situation.

ahus1
  • 557
  • 4
  • 12
  • Naah, the `gitFS` is just too much effort :D ... but thanks for the confirmation! I'm marking your answer – pepoluan Jul 30 '16 at 14:52