Setting environment variables with puppet

前端 未结 5 2057
离开以前
离开以前 2021-02-05 22:36

I\'m trying to work out the best way to set some environment variables with puppet.

I could use exec and just do export VAR=blah. However, that would only

5条回答
  •  忘了有多久
    2021-02-05 23:10

    If you take a look at Github's Boxen they source a script (/opt/boxen/env.sh) from ~/.profile. This script runs a bunch of stuff including:

    for f in $BOXEN_HOME/env.d/*.sh ; do
      if [ -f $f ] ; then
        source $f
      fi
    done
    

    These scripts, in turn, set environment variables for their respective modules.

提交回复
热议问题