Ask Your Question

Variables in r10k.yaml

asked 2016-09-27 04:14:49 -0500

Are variables supported in r10k.yaml or is there anyway to have two sources in an r10k.yaml. I have a profile module that has several branches and it's a pain in the ass to go in and modify the :ref for each branch on each module addition. If it's possible, it'd be nice if I could simply say something like:

mod 'foo/profile', :git => 'https://my.repo/puppet/controlrepo', :ref => $::environment

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-02-10 05:54:04 -0500

This here gives a pretty good example of how this can be achieved. This allows someone to check in a controlrepo and merge them between test and production. Very nice indeed.

edit flag offensive delete link more

answered 2017-02-10 06:30:31 -0500

puser gravatar image

My company has a repos for code with two branches, the feature branch and the master. Then in r10k we have branches for feature, stage, nonprod, and production. When code is checked into the master it is tagged, we then update the tag in r10k in stage and test it, as it works we merge into non-prod, then prod. r10k is only updated once but it refers to the code in master correctly.

I think a git timeline showing each tag or commit would be useful to you to understand this functionality.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2016-09-27 04:14:49 -0500

Seen: 168 times

Last updated: Feb 10