0

How can i write a Puppet manifest for exporting 2 variables:

export REDISTOGO_URL=redis://192.168.3.4:6379
export PATH=$PATH:/home/vagrant/appname/vendor/bundle/bin/

Any suggestion?

Thank you.

fedorqui
  • 275,237
  • 103
  • 548
  • 598
basante
  • 1
  • 2

1 Answers1

1

Assuming that you are utilizing a linux platform, you can use the answer from this question:

The answer to that question suggests using a puppet file resource on an /etc/profile.d script:

file { "/etc/profile.d/my_test.sh"
  content => "
export REDISTOGO_URL=redis://192.168.3.4:6379
export PATH=$PATH:/home/vagrant/appname/vendor/bundle/bin/
"
}
Community
  • 1
  • 1
Ben Odom
  • 11
  • 1
  • Thanks Ben, if i add those line to puppet manifest, i get this errors: The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable. Command 'curl' is available in '/usr/bin/curl' The command could not be located because '/usr/bin' is not included in the PATH environment variable. curl: command not found ~$ echo $PATH :/home/vagrant/appname/vendor/bundle/bin/ all other env variables are remove from PATH. – basante Mar 19 '14 at 08:47
  • any other suggestion ? – basante Mar 19 '14 at 10:57
  • Escape the `$` or use single quotes. – Dominic Cleal Jan 17 '17 at 08:42