Guest User

Untitled

a guest
Oct 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. $bar = 'bar'
  2.  
  3. class foobar {
  4. exec { 'foobar':
  5. command => "export Foo=${bar}",
  6. }
  7. }
  8.  
  9. Exec { environment => [ "foo=$bar" ] }
  10.  
  11. class example($somevar) {
  12. file { "/etc/environment":
  13. content => inline_template("SOMEVAR=${somevar}")
  14. }
  15. }
  16.  
  17. $bar = 'bar'
  18. file { "/etc/profile.d/my_test.sh":
  19. content => "export Foo=${bar}",
  20. mode => 755
  21. }
  22.  
  23. class foobar {
  24. exec { 'foobar' :
  25. command => "/bin/bash -c "export Foo=${bar}"",
  26. }
  27. }
  28.  
  29. $PS1 = '[e[0;31m]u[e[m] [e[1;34m]w[e[m] $ '
  30.  
  31. exec {"vagrant-prompt":
  32. unless => "grep -F 'export PS1="${PS1}"' ${HOME_DIR}/.bashrc",
  33. command => "echo 'export PS1="${PS1}"' >> ${HOME_DIR}/.bashrc",
  34. user => "${APP_USER}",
  35. }
  36.  
  37. file_line { "foo_env_var":
  38. ensure => present,
  39. line => "Foo=${bar}",
  40. path => "/etc/environment",
  41. }
Add Comment
Please, Sign In to add comment