On 08/03/16 15:15, Rudy Gevaert wrote:
Just wondering what others have done and what approaches they have
taken to solve this issue? Maybe there is some feature of git I am
not aware of where I can systematically pick what to merge and what
not (although if that was possible I can see it being very confusing).
Hi Matthew,
I haven't tried it, but have you looked at the new feature in puppet 4
which allows you to store hiera data in modules?
https://docs.puppetlabs.com/puppet/latest/reference/lookup_quick_module.html
Here you can define a hierachy in the module itselve. If you tie it to
the environment variable you can keep it sane I think.
There is no good way of tagging a branch/environment with meta data
without actually changing things in the environment (that I know of) -
it would be great if we could, without touching anything in the
environment state that it is for "development", "testing" etc.
What you can do is to construct your hierarchy in the environment such
that if a data file is present it will do an override of the production
value(s). You also add a .gitignore on that file. It will never be
checked in, so as long as you are developing on the branch you will get
the values overridden for development, but there is no risk of it
leaking into production branches.
You naturally check in the .gitignore.
If you want to automate that, you can write a rake task or similar to
write the file. You can check that in so you don't have to manually
remember what to override and how.
- henrik
--
Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/56DF96E0.7030608%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.