Project

General

Profile

Actions

Feature #15972

open

Foreman fact name used for 'update_environment_from_facts' should be parametrizable

Added by Robert Heinzmann over 8 years ago. Updated over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Facts
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

New Puppet Code does not automatically export the "Environment" fact anymore. See http://projects.theforeman.org/issues/2205.

To allow clients to switch environments permanently when using Foreman as ENC and to support reporting the puppet client environment in Foreman dashboard, the ticket suggests adding a custom fact, which works for us.

However puppet has a very bad behaviour in 3.x, as custom facts can overwrite ENC set environment. See https://tickets.puppetlabs.com/browse/PUP-2630 for reference.

Currently the name of the fact used for "update_environment_from_facts" is hard coded to :environment, which causes a lot of side effects caused by the puppet bug above.

To provide reasonable compatibility, Foreman should support a new config option to define the fact name which will be used for "update_environment_from_facts" (e.g. puppet_environment). This way, clients side effects by setting the custom fact "environment" can be avoided while allowing the user who want's to "use update_environment_from_facts", to use this functionality by using another fact name as source for update_environment_from_facts.

The default value can be "environment" to provide 100% backward compatibility.


Files

puppet 3 environment overwrite.png View puppet 3 environment overwrite.png 10.8 KB Environment Test Cases Puppet 3.8.6 Robert Heinzmann, 08/03/2016 06:50 PM

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #2205: Environment doesn't exist in Puppet 3+ facts YAMLResolved02/13/2013Actions
Actions

Also available in: Atom PDF