FAQ
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?

Thanks!

--
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+unsubscribe@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.

Search Discussions

  • Jcbollinger at May 8, 2013 at 6:43 pm

    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+unsubscribe@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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 8, '13 at 5:44p
activeMay 8, '13 at 6:43p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Jcbollinger: 1 post Worker Bee: 1 post

People

Translate

site design / logo © 2022 Grokbase