My puppet file looks like this:
# Test finger harry harry.pp
exec {'harryd':
command => "/usr/bin/finger $title",
logoutput => true
}
When I run puppet apply harry.pp
I get this output:
notice: /Stage[main]//Exec[harryd]/returns: finger: main: no such user.
notice: /Stage[main]//Exec[harryd]/returns: executed successfully
notice: Finished catalog run in 0.14 seconds
Running finger harryd
gets me the expected output. It looks like puppet is running finger main
, but I don't understand why.
$title
is only specially set to the title of the resource within the scope of a defined type, whichexec
is not.So if you had..
..then that would work as intended, since within the scope of the defined type,
$title
is set to the title of the defined type.Can you clarify what you're trying to achieve?