Hello everyone. I'm running in to trouble setting/changing environment variables for exec resources in 2.6.2. If the environment variable exists before I try to run the command, puppet can't seem to change it. For example,
exec {"foo": environment => "PATH=/blah", command => "/bin/bash -c \"echo \$PATH\"", logoutput => true; } returns the old PATH value. Now, if I make up a new variable that didn't exist prior to the exec, like MYVAR, it works. exec {"foo2": environment => "MYVAR=MYVAL", command => "/bin/bash -c \"echo \$MYVAR\"", logoutput => true; } returns MYVAL. Here's where it gets weird. I get the same exact behavior if I set the variable in the bash command string. exec {"foo3": command => "/bin/bash -c \"export PATH=/blah; echo \$PATH\"", logoutput => true; } returns the old PATH value. While this returns MYVAL, exec {"foo4": command => "/bin/bash -c \"export MYVAR=MYVAL; echo \$MYVAR\"", logoutput => true; } Is this an actual bug or am I missing something? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.