Skip to content
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

Enhancement: Puppetfile - module link support #6

Closed
bkuebler opened this issue Jan 22, 2016 · 0 comments · Fixed by #7
Closed

Enhancement: Puppetfile - module link support #6

bkuebler opened this issue Jan 22, 2016 · 0 comments · Fixed by #7

Comments

@bkuebler
Copy link
Contributor

If you create environments like "production/development/staging/testing" and so on it would be a nice feature to link these environment branches again your puppet module branches. For example:

Environment "production" <=> Environment branch "production" <=> Module branch "production"

The default solution to do this is to have different "Puppetfile" configuration in your environments:

Puppetfile (production)

mod 'awesomemodule',
  :git => 'http://github.com/foo/bar.git',
  :branch => 'production'

Puppetfile (development)

mod 'awesomemodule',
  :git => 'http://github.com/foo/bar.git',
  :branch => 'development'

But in this scenario you will loose the nice git workflow for merge between the environments. Because each Puppetfile is different and if you would like to use your puppet environments as real Changemanagement stages for example:

Do puppet changes in development environment => merge these changes to testing/staging environment => merge testing/staging environment into production.

So a solution to get this working is support i called it "module link support". The Puppetfile could be looks like this:

mod 'awesomemodule',
  :git => 'http://github.com/foo/bar.git',
  :link => 'true'

So each Puppetfile in environments is the same, but the used module in each environment is on different branch with the same name of the environment branch.

I'll send you a merge request for this feature in the next time.

regards Benjamin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant