Project

General

Profile

Actions

Bug #14474

open

Smart Class Parameter : the default value is not defined by environment

Added by julien ippolito about 8 years ago. Updated almost 7 years ago.

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

Description

If i have 2 environements:
test
dev

with module module_1 (param1 = '123')
in test environment

and
module module_1 (param1 = '456')
in dev environment

The default value of puppet parameters is not defined by environement. Foreman always show '123' value

Actions #1

Updated by Ori Rabin about 8 years ago

  • Status changed from New to Need more information

Hi Julien,
Could you please explain where you are using the parameter and what you expect to see?
Smart class parameters only have one default value.
To change the value by environment you need to add matchers on environment: http://www.theforeman.org/manuals/1.9/index.html#4.2.6SmartMatchers
Then you will see param1 with the value '123' for all hosts that are in test environment and the value '456' for all hosts in dev environment.

Actions #2

Updated by julien ippolito about 8 years ago

I have one puppet module which in version 1.0 have for default parameters
value= '123'

and in version 2.0 of the same module, the default value is '234'

in the puppet master, i have 2 puppet environment
  • production with the module in version 1.0
  • developpement in version 2.0

In foreman, i have hostgroup and machine defined with the puppet environnement.

When i edit one hostgroup or host, i want have the true puppet default value. If the hostgroup (or host) are in the developpement environment, i need to display 234 and if is production environment, foreman need to display '123'.

Actualy i connot see the real default value of one parameter because this depend of the puppet environment.
The user always override the value, because i thinks that the default value is not good.

thanks

Actions #3

Updated by Anonymous almost 7 years ago

  • Status changed from Need more information to New
Actions

Also available in: Atom PDF