Ask Your Question

What folders have to add in version control

asked 2016-07-05 00:54:05 -0500

venky gravatar image

I am using git version control have puppet environments prod,dev,stg and tst. So at what folder level i should keep in version control. I mean add one module in one git repository. like that i have 6 modules will have 6 repositories ? Add all modules in one repository ? Add all modules and manifests folder in one repository ? But each environment folder have separate site.pp file with different node definitions.

I see most of public github repos have only module folder not root manifests or node definitions. If i use dynamic environments i should add manifests and modules in one folder which clones for every new branch push.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-07-05 01:47:47 -0500

If you have 6 modules then you probably want 6 repos, then you'll have a separate "control repo" that imports them all, probably using R10K or Librarian-puppet. For example: link.

edit flag offensive delete link more


According to what I've read `r10k` is favored over `librarian-puppet`. See

bittner gravatar imagebittner ( 2017-05-27 11:55:01 -0500 )edit

answered 2016-07-05 08:05:07 -0500

scoffland gravatar image

We use 1 repo for everything. Modules just go in the modules directory and environments are set with different git branches Our setup is a little bit different as we locally apply with PPG but this logic should work on a puppet master also.

edit flag offensive delete link more


Using 1 repo for everything doesn't promote code sharing and code re-use, however, so I would not recommend this.

Alex Harvey gravatar imageAlex Harvey ( 2016-07-05 19:18:36 -0500 )edit

Not sure why you can't share modules or reuse code if using a single local repo.

scoffland gravatar imagescoffland ( 2016-07-05 19:46:01 -0500 )edit

It would create quite a number of difficulties for sharing code on the Puppet Forge for instance, however I can't really go into the details here.

Alex Harvey gravatar imageAlex Harvey ( 2016-07-05 20:44:13 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-07-05 00:54:05 -0500

Seen: 54 times

Last updated: Jul 05 '16