Hi,
common.yaml:
variable:
baculaWorkingDirectory: '/var/lib/bacula'
variables:
baculaWorkingDirectory: '/var/lib/bacula'
config.pp:
[...]
$variables = lookup({
"name" => "variables",
"merge" => {
"strategy" => "deep",
"knockout_prefix" => "--",
# "sort_merged_arrays" => true,
},
"default_value" => [],
})
[...]
bacula.pp:
class bacula inherits config {
$test1 = lookup('variable.baculaWorkingDirectory')
#$test2 = lookup('variables.baculaWorkingDirectory')
$baculaWorkingDirectory = $variables['baculaWorkingDirectory']
notify {"Test": message => $test1}
#notify {"Test": message => $test2}
notify {"baculaWorkingDirectory": message => $baculaWorkingDirectory}
}
Notice: /var/lib/bacula
Notice: /Stage[main]/Bacula/Notify[Test]/message: defined 'message' as
'/var/lib/bacula'
Debug: /Stage[main]/Bacula/Notify[Test]: The container Class[Bacula]
will propagate my refresh event
Notice: /var/db/bacula
Notice: /Stage[main]/Bacula/Notify[baculaWorkingDirectory]/message:
defined 'message' as '/var/db/bacula'
If I uncomment #test2:
Error: Could not retrieve catalog from remote server: Error 500 on
SERVER: Server Error: Function lookup() did not find a value for the
name 'variables.baculaWorkingDirectory' on node
bsdhelmut1164.charlieroot.de
What am I missing?
Thank you.
--
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/xn0ldqjfd8vw7x000%40news.gmane.org.
For more options, visit https://groups.google.com/d/optout.