config settings for environments

40 views
Skip to first unread message

Rob McBroom

unread,
Mar 10, 2010, 3:07:57 PM3/10/10
to puppet...@googlegroups.com
Hello. The documentation on using multiple environments says there are only a couple of settings that make sense per-environment (modulepath, templatedir, manifest) but it’s not clear to me whether or not those are the only ones supported.

Specifically, I’m trying to set config_version. Each of my environments are clones of the same git repo at different points in its history, so using git to determine a config_version should yield different results in different environments.

I set a default value for config_version and then do something like this for a test environment:

[test]
manifest = /etc/puppet/manifests/test/site.pp
modulepath = /etc/puppet/manifests/test/modules
config_version = 'git --git-dir /etc/puppet/manifests/test/.git rev-parse --shor
t HEAD 2>/dev/null || echo'

But the configuration version shown on the client is always that of production (the default).

--
Rob McBroom
<http://www.skurfer.com/>

It's not that I think guns, drugs, prostitution, swimming, eating and reading should be legal. It's just that no one on Earth has the authority to make them illegal.

Rob McBroom

unread,
Mar 10, 2010, 3:22:44 PM3/10/10
to puppet...@googlegroups.com
On Mar 10, 2010, at 3:07 PM, Rob McBroom wrote:

> Hello. The documentation on using multiple environments says there are only a couple of settings that make sense per-environment (modulepath, templatedir, manifest) but it’s not clear to me whether or not those are the only ones supported.

Sorry, forgot to say that both master and client are at 0.25.4. Thanks.

--
Rob McBroom
<http://www.skurfer.com/>

Because it screws up the order in which people normally read text.

Original message:

> Why is it bad to top-post your reply?

Alan Barrett

unread,
Mar 13, 2010, 12:10:06 PM3/13/10
to puppet...@googlegroups.com
On Wed, 10 Mar 2010, Rob McBroom wrote:
> Hello. The documentation on using multiple environments says there are
> only a couple of settings that make sense per-environment (modulepath,
> templatedir, manifest) but it=??s not clear to me whether or not those

> are the only ones supported.

I believe that those three are the only variables that may
be changed per environment.

> Specifically, I=??m trying to set config_version. Each of my


> environments are clones of the same git repo at different points in
> its history, so using git to determine a config_version should yield
> different results in different environments.

Sorry, you are out of luck. I suggest filing a feature request for the
environment name and/or other relevant variables to be passed to the
config_version script.

--apb (Alan Barrett)

John Warburton

unread,
Nov 29, 2010, 1:34:03 AM11/29/10
to puppet...@googlegroups.com
I am guessing this feature request didn't get submitted (well not on keyword config_version), and I just hit it

The way I do it is that my config_version script shells out a call to the node classifier (I'm one of the lucky ones who has one!) and greps for the environment

I have filed http://projects.puppetlabs.com/issues/5404

John


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.




--
John Warburton
Ph: 0417 299 600
Email: jwarb...@gmail.com

John Warburton

unread,
Nov 29, 2010, 5:38:48 PM11/29/10
to puppet...@googlegroups.com
One important thing I missed out is that I get my server name passed as an environment variable ($SSL_CLIENT_S_DN_CN no less) because I run puppetmaster from passenger.

John
Reply all
Reply to author
Forward
0 new messages