Foreman resets environment on nodes?

Trying to find a solution to this.

I'm running the following:
Foreman 1.7.5
Puppet 3.8.1

From what I've been reading on this issue it seems that these settings in
the Foreman are important, so here's what I have:

enc_environment = True
update_environment_from_facts = False
default_puppet_environment = development

So the problem is that when I set the environment on the node's puppet.conf
file it is ignored and gets put in the "development" environment. I have no
problems changing the environment after and the node will stay in that
environment after it is set through the UI.

How do I stop this from happening? How do I get the Foreman to recognize
the correct environment?

··· -- *The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.*

The environment in Foreman itself always takes precedence over the
puppet.conf, I don't know how to avoid that. You'll have to change
the host's environment in Foreman.

··· On Wed, Jun 10, 2015 at 12:18:46PM -0700, Kevin White wrote: > Trying to find a solution to this. > > I'm running the following: > Foreman 1.7.5 > Puppet 3.8.1 > > From what I've been reading on this issue it seems that these settings in > the Foreman are important, so here's what I have: > > enc_environment = True > update_environment_from_facts = False > default_puppet_environment = development > > So the problem is that when I set the environment on the node's puppet.conf > file it is ignored and gets put in the "development" environment. I have no > problems changing the environment after and the node will stay in that > environment after it is set through the UI. > > How do I stop this from happening? How do I get the Foreman to recognize > the correct environment?

Set enc_environment to false, and Foreman won't supply it to the Puppet
master via the ENC and the agent gets to choose it.

··· On 10/06/15 20:18, Kevin White wrote: > Trying to find a solution to this. > > I'm running the following: > Foreman 1.7.5 > Puppet 3.8.1 > > From what I've been reading on this issue it seems that these settings > in the Foreman are important, so here's what I have: > > enc_environment = True > update_environment_from_facts = False > default_puppet_environment = development > > So the problem is that when I set the environment on the node's > puppet.conf file it is ignored and gets put in the "development" > environment. I have no problems changing the environment after and the > node will stay in that environment after it is set through the UI. > > How do I stop this from happening? How do I get the Foreman to recognize > the correct environment?


Dominic Cleal
Red Hat Engineering