I have a script that I execute to run a mono exe during a setup process. I
would like to automate that with puppet but the exe depends on an
environment variable being set or it will fail. My setup.sh file looks
like this.

export MY_ENV_VAR=$HOME/target_dir
/usr/mono/bin/mono $HOME/path_to_exe/Setup.exe

this fails because well $HOME is meaningless in a puppet context. Here's
is what I would like to do.

exec { 'myscript':
         command => "/bin/sh /some_path/scripts/setup.sh",

I can't change the mono exe to not rely on special environment variable.
  That isn't an option.

So in summary I need to be able to set a special env variable for the exec
context and I have to be able to dynamically change the path to the exe
because each users home directory will be different. I searched for a
while but now my eyes are just crossed.

Any ideas?

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.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouppuppet-users @
postedSep 20, '13 at 8:27p
activeSep 23, '13 at 3:09p

2 users in discussion

Derek Strickland: 1 post Jcbollinger: 1 post



site design / logo © 2022 Grokbase