On Wednesday, May 8, 2013 12:44:14 PM UTC-5, Worker Bee wrote:
>
> Hi Everyone;
>
> It appears that in Puppet 3, environment variables are not passed to the 
> agent.  Specifically, $HOME is not defined so, if a script attempts to use 
> ~ , this fails becasue $HOME is no longer defined to the agent.  This seems 
> to have changed since 2.7.
>
> Does anyone have any feedback/advice?
>


There are two main issues here: the environment the OS provides to the 
agent, and the environment the agent provides to processes it spawns.  The 
environment provided to the agent depends on the way in which the agent is 
launched, and is not under the agent's control.  In particular, it will be 
very sparse when the agent is launched in any of the usual automated ways 
(init script, cron job, etc.).  More generally, I would not expect $HOME to 
be passed to the agent unless it were launched from a login shell or a 
descendant of one.

On the other side, Puppet has always been very parsimonious about the 
environment it passes to child processes.  This is simply good practice.

I doubt either of these changed significantly from Puppet 2.7 to Puppet 3.

I anyway find it very questionable to use the Puppet agent to run a script 
that depends on the home directory of the user.  Maybe a solution would 
become apparent if you explain more specifically what you're trying to 
achieve.


John



-- 
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 puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to