John, Thank You for excellent explanation! Wrapping it all up into a single Exec works. Moreover now I understand how to puppet execute shell commands. Wrapping is now only way to deploy postgresql database in my environment.
Best Regards W dniu środa, 17 lipca 2013 09:56:34 UTC+2 użytkownik Przemek napisał: > > Hi Puppet Community, > > I prepare manifests and modules to deploy stuff that I need on agent. > During building postgres database I have to export some environmental UNIX > variables stored in "some_file.conf". > Standard procedure to do this is simply run command: > > root@hostname:/path_to_config_file# . some_file.conf >> > > and after this I see all exported variables ("env" command in terminal). > > Now when I trying do the same thing in puppet exec but variables wont > export (no error feedback from agent on debug mode). > Puppet code: > > exec {"enviroments": >> command => '/bin/sh -c ". some_file.conf"', >> path => ["/bin", "/usr/bin","/path_to_config_file"], >> cwd => "/path_to_config_file", >> refreshonly => false, >> require => File["/path_to_config_file/some_file.conf"], >> } >> > > Puppet version: 3.1.1 > Distributor ID: Debian > Description: Debian GNU/Linux 6.0.7 (squeeze) > Release: 6.0.7 > Codename: squeeze > > I will be very grateful for any help, clues or tips that lead me to > resolve this problem. > P.S > Sorry for my grammar and poor English. > > Best Regards > -- 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+unsubscr...@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.