Foreman ENC puppet environment mismatch

I found a rather sexy workaround on my trusted site. Have a read here. This
has worked perferctly for me. Upgrading to Puppet 3 didn't look
straightforward, but this worked perfectly. Thank you seriousbirder.com!!
what a dumb name though.

http://seriousbirder.com/blogs/puppet-enc-foreman-environment-differ/

··· On Thursday, 11 October 2012 11:02:59 UTC-4, puppet-foreman wrote: > > I've seen assorted issues with the environment being defined in foreman > and handled via ENC not being propagated properly. > > I read a lot of configuration / build information from this site: > http://seriousbirder.com/blogs/puppet-master-server-and-foreman-console-configuration-guide/ > > and managed to get my puppet master working perfectly with 50+ client > nodes, all good. > > My issue is when in foreman I change an environment from the console the > changes are reflected. But when the client agent runs, it thinks its in the > production environment which is the default in my puppet.conf master file. > > Is this a puppet or foreman issue? Is the puppet issue > http://projects.puppetlabs.com/issues/3910 > > >

I've updated to Puppet 3.0 today, and can confirm that the ENC Environment
value wins out over local config…

However I'm seeing some strange behaviour in that the local host
environment value in Foreman is being over-written following a successful
Puppet run.
However the Puppet run correctly reports the Foreman environment…

Is this another Foreman<>Puppet 3.0 issue?

Cheers
Gavin

··· On Thursday, 11 October 2012 19:03:14 UTC+1, puppet-foreman wrote: > > I found a rather sexy workaround on my trusted site. Have a read here. > This has worked perferctly for me. Upgrading to Puppet 3 didn't look > straightforward, but this worked perfectly. Thank you seriousbirder.com!! > what a dumb name though. > > http://seriousbirder.com/blogs/puppet-enc-foreman-environment-differ/ > > On Thursday, 11 October 2012 11:02:59 UTC-4, puppet-foreman wrote: >> >> I've seen assorted issues with the environment being defined in foreman >> and handled via ENC not being propagated properly. >> >> I read a lot of configuration / build information from this site: >> http://seriousbirder.com/blogs/puppet-master-server-and-foreman-console-configuration-guide/ >> >> and managed to get my puppet master working perfectly with 50+ client >> nodes, all good. >> >> My issue is when in foreman I change an environment from the console the >> changes are reflected. But when the client agent runs, it thinks its in the >> production environment which is the default in my puppet.conf master file. >> >> Is this a puppet or foreman issue? Is the puppet issue >> http://projects.puppetlabs.com/issues/3910 >> >> >>

Found even more easy solution!
I added Global Parameter environment = *id001
and it worked ok!

··· On Thursday, October 11, 2012 8:03:14 PM UTC+2, puppet-foreman wrote: > > I found a rather sexy workaround on my trusted site. Have a read here. > This has worked perferctly for me. Upgrading to Puppet 3 didn't look > straightforward, but this worked perfectly. Thank you seriousbirder.com!! > what a dumb name though. > > http://seriousbirder.com/blogs/puppet-enc-foreman-environment-differ/ > > On Thursday, 11 October 2012 11:02:59 UTC-4, puppet-foreman wrote: >> >> I've seen assorted issues with the environment being defined in foreman >> and handled via ENC not being propagated properly. >> >> I read a lot of configuration / build information from this site: >> http://seriousbirder.com/blogs/puppet-master-server-and-foreman-console-configuration-guide/ >> >> and managed to get my puppet master working perfectly with 50+ client >> nodes, all good. >> >> My issue is when in foreman I change an environment from the console the >> changes are reflected. But when the client agent runs, it thinks its in the >> production environment which is the default in my puppet.conf master file. >> >> Is this a puppet or foreman issue? Is the puppet issue >> http://projects.puppetlabs.com/issues/3910 >> >> >>

Maybe you didn't set this Foreman setting to false:
update_environment_from_facts

Mikael

··· On Fri, Oct 26, 2012 at 11:41 AM, Gavin Williams wrote: > I've updated to Puppet 3.0 today, and can confirm that the ENC Environment > value wins out over local config... > > However I'm seeing some strange behaviour in that the local host environment > value in Foreman is being over-written following a successful Puppet run. > However the Puppet run correctly reports the Foreman environment...

Sorry about that, after normal testing we founded that it was not working
properly, so we are assigning environment as parameter now

··· On Tuesday, December 4, 2012 2:14:02 PM UTC+2, Andrei Burd wrote: > > Found even more easy solution! > I added Global Parameter environment = *id001 > and it worked ok! > > On Thursday, October 11, 2012 8:03:14 PM UTC+2, puppet-foreman wrote: >> >> I found a rather sexy workaround on my trusted site. Have a read here. >> This has worked perferctly for me. Upgrading to Puppet 3 didn't look >> straightforward, but this worked perfectly. Thank you seriousbirder.com!! >> what a dumb name though. >> >> http://seriousbirder.com/blogs/puppet-enc-foreman-environment-differ/ >> >> On Thursday, 11 October 2012 11:02:59 UTC-4, puppet-foreman wrote: >>> >>> I've seen assorted issues with the environment being defined in foreman >>> and handled via ENC not being propagated properly. >>> >>> I read a lot of configuration / build information from this site: >>> http://seriousbirder.com/blogs/puppet-master-server-and-foreman-console-configuration-guide/ >>> >>> and managed to get my puppet master working perfectly with 50+ client >>> nodes, all good. >>> >>> My issue is when in foreman I change an environment from the console the >>> changes are reflected. But when the client agent runs, it thinks its in the >>> production environment which is the default in my puppet.conf master file. >>> >>> Is this a puppet or foreman issue? Is the puppet issue >>> http://projects.puppetlabs.com/issues/3910 >>> >>> >>>

Ahh, good shout… Didn't know that one even existed…

Have set it to false and confirm that the Foreman config is now persisting
:slight_smile:

Cheers
Gavin

··· On 26 October 2012 10:56, Mikael Fridh wrote:

On Fri, Oct 26, 2012 at 11:41 AM, Gavin Williams fatmcgav@gmail.com > wrote:

I’ve updated to Puppet 3.0 today, and can confirm that the ENC
Environment
value wins out over local config…

However I’m seeing some strange behaviour in that the local host
environment
value in Foreman is being over-written following a successful Puppet run.
However the Puppet run correctly reports the Foreman environment…

Maybe you didn’t set this Foreman setting to false:
update_environment_from_facts

Mikael


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