On 10/10/12 21:52, Felipe Salum wrote:
> exec { 'test':
> path =>
> '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
> environment => ["HOME=test", "HOME2=test2"],
> command => "echo $HOME > /tmp/key",
> user => 'root',
> group => 'root',
> }
Hi. You need to escape the $ character!
For instance: "echo \$HOME > /tmp/key"
If you had defined $HOME within your manifest, then that would be the
value that puppet substituted:
$HOME = 'HI'
exec { 'test':
path =>
'/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
environment => ["HOME=test", "HOME2=test2"],
command => "echo $HOME > /tmp/key",
user => 'root',
group => 'root',
}
Cheers. Tom.