Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =======================
- old way (in module):
- =======================
- paramp.pp:
- class myclass::params {
- $myparam = 'hello'
- }
- init.pp:
- class myclass (
- $myparam = hiera('myclass::myparam', myclass::params::myparam),
- ) inherits myclass::params {
- *snip*
- }
- =======================
- new way (in module):
- =======================
- hiera.yaml:
- version: 5
- data_dir: data
- data_hash: yaml_data
- hierarchy:
- - name: 'common'
- path: 'common.yaml'
- data/common.yaml:
- myclass::myparam: 'hello'
- init.pp:
- class myclass (
- String $myparam = lookup('myclass::myparam')
- ) {
- *snip*
- }
- myparam will always cause failure or be undef here, even if i pass default_value to lookup since i cannot grab
- the data from hiera module data again?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement