Issue #6400 has been updated by Gabriel Monroy.
I'd like to add another voice of support for this. I find it often necessary
to add custom environment variables to prevent daemon starts during package
install. Here's an example from Ubuntu 12.04 LTS:
# NOTE: use exec instead of package resource so we can set RUNLEVEL=1
# which prevents the rabbitmq-server daemon from starting
# on package install, which is currently broken
exec { "/usr/bin/apt-get -yq install rabbitmq-server":
environment => "RUNLEVEL=1",
unless => "/usr/bin/dpkg -l rabbitmq-server | tail -1 | grep ^ii",
require => Apt::Source["rabbitmq"],
}
----------------------------------------
Feature #6400: Package type should support environment variables
https://projects.puppetlabs.com/issues/6400#change-77209
Author: Jeff McCune
Status: Accepted
Priority: Normal
Assignee: Jeff McCune
Category: package
Target version:
Affected Puppet version: 2.6.0
Keywords: apt, dpkg, environment, debian, sudo, SUDO_FORCE_REMOVE, squeeze
Branch:
## Overview ##
With the release of Debian Squeeze, a customer mentioned some Debian packages
are beginning to use environment variables to override behavior. For example,
the sudo-ldap package will not install if there is no password set on the root
account.
# This is needed for removing the sudo package since it won't uninstall
# when there is no root password set or $SUDO_FORCE_REMOVE != yes
exec { '/usr/bin/apt-get --force-yes --assume-yes install sudo-ldap':
environment => 'SUDO_FORCE_REMOVE=yes',
unless => '/usr/bin/dpkg -l sudo-ldap|tail -1|grep "^ii"'
}
## Expected Behavior ##
Like the exec resource type, the package type should support an environment
parameter to set arbitrary environment variables when installing packages.
## Other notes ##
The customer believes this will only become more prevalent in the future with
Debian based systems. While they have not specifically paid for the feature, a
paying customer has requested we file and address this feature request.
I'll be taking a look into it while I'm on their time today.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.