Hi,

I'm using Puppet 4 and I'm wondering if this (see below) is possible.

I have 2 Puppet modules, moda and modb. We can imagine that theses modules
have just one class init.pp. The class ::moda has a parameter "param" with
the default value defined in the code of "./moda/functions/data.pp". The
module modb depends on the module moda (the dependency is indicated in
./modb/metadata.json) and the class ::modb have the parameter "param" too.

I would like to define the default value of the parameter ::modb::param
to ensure that it is equal to the value of ::moda::param, ie I would like
to have this:

a) If the value of ::moda::param is defined in hiera or in environment.conf
with "moda::param: xxxx", then the default value of ::modb::param is xxxx too.

b) If the value of ::moda::param is not defined at all (in hiera, in 
environment.conf
etc.), then the default value of ::modb::param is moda::data()['moda::param'].

Is there a proper way to do that with Puppet 4?
Thanks in advance for your help.

François Lafont

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/565BCBE4.9090008%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to