Kevin Lange
2013-Jun-19 17:08 UTC
[Puppet Users] Set environment variable that is visible to package installation
We have RPMs which requires an environment variable to be set prior to installation (contains conf information). What is the best way to do this? I''d like to avoid setting this environment var in each systems'' profile. It would be nice to have an option to do this within the package type, but I think that''s not very likely. -- 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.
Nikola Petrov
2013-Jun-20 14:53 UTC
Re: [Puppet Users] Set environment variable that is visible to package installation
You can get the environment variable from puppet.conf or if it is another variable, you can use facter. As long as you are controlling your packages you can check those after that. -- Nikola On Wed, Jun 19, 2013 at 10:08:46AM -0700, Kevin Lange wrote:> We have RPMs which requires an environment variable to be set prior to > installation (contains conf information). What is the best way to do > this? I''d like to avoid setting this environment var in each systems'' > profile. It would be nice to have an option to do this within the package > type, but I think that''s not very likely. > > -- > 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. > >-- 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.
Michael Dodwell
2013-Jun-21 00:37 UTC
Re: [Puppet Users] Set environment variable that is visible to package installation
Another method is to use exec {} instead of package {} to install the rpm. This will enable you to set environment => ''BATCH=myval'', path => [''/bin'', ''/usr/bin''] etc use unless to check if the package is installed so it doesn''t try to install it multiple times. On Friday, June 21, 2013 12:53:38 AM UTC+10, nikolavp wrote:> > You can get the environment variable from puppet.conf or if it is > another variable, you can use facter. As long as you are controlling > your packages you can check those after that. > > -- > Nikola > > On Wed, Jun 19, 2013 at 10:08:46AM -0700, Kevin Lange wrote: > > We have RPMs which requires an environment variable to be set prior to > > installation (contains conf information). What is the best way to do > > this? I''d like to avoid setting this environment var in each systems'' > > profile. It would be nice to have an option to do this within the > package > > type, but I think that''s not very likely. > > > > -- > > 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...@googlegroups.com <javascript:>. > > To post to this group, send email to puppet...@googlegroups.com<javascript:>. > > > Visit this group at http://groups.google.com/group/puppet-users. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > >-- 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.