On Wed, Jun 01, 2016 at 05:34:59PM +0200, Henrik Lindberg wrote:
First check what you get in puppet with a simple manifest:
notice($facts)
$ sudo puppet apply -e 'notify{"${os}":}'
Notice: Compiled catalog for host in environment production in 0.02 seconds
Notice: {"name"=>"CentOS", "family"=>"RedHat", "release"=>{"major"=>"7", "minor"=>"2", "full"=>"7.2.1511"}, "lsb"=>{"distcodename"=>"Core", "distid"=>"CentOS",
"distdescription"=>"CentOS Linux release 7.2.1511 (Core) ", "release"=>":core-4.1-amd64:core-4.1-noarch", "distrelease"=>"7.2.1511", "majdistrelease"=>"7", "minordistrelease"=>"2"}}
Notice: /Stage[main]/Main/Notify[{"name"=>"CentOS", "family"=>"RedHat", "release"=>{"major"=>"7", "minor"=>"2", "full"=>"7.2.1511"}, "lsb"=>{"distcodename"=>"Core", "distid"=>"CentOS", "distdescription"=>"CentOS Linux release 7.2.1511 (Core) ", "release"=>":core-4.1-amd64:core-4.1-noarch", "distrelease"=>"7.2.1511", "majdistrelease"=>"7", "minordistrelease"=>"2"}}]/message:
defined 'message' as '{"name"=>"CentOS", "family"=>"RedHat", "release"=>{"major"=>"7", "minor"=>"2", "full"=>"7.2.1511"}, "lsb"=>{"distcodename"=>"Core", "distid"=>"CentOS", "distdescription"=>"CentOS Linux release 7.2.1511 (Core) ", "release"=>":core-4.1-amd64:core-4.1-noarch", "distrelease"=>"7.2.1511", "majdistrelease"=>"7", "minordistrelease"=>"2"}}'
Notice: Finished catalog run in 0.70 seconds
$ sudo puppet apply -e 'notify{"foo ${facts}":}'
Notice: Compiled catalog for host in environment production in 0.03 seconds
Notice: foo
Notice: /Stage[main]/Main/Notify[foo ]/message: defined 'message' as 'foo '
Notice: Finished catalog run in 0.81 seconds
$ sudo puppet --version
3.8.6
Unfortunately, I cannot see here whether ${os} is actually a string,
can I?