From f8a9c530e0694b956fb5819dd46e38380ecc58e2 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Wed, 4 Feb 2015 21:45:44 -0500 Subject: puppet: Add EnablePackageInstall option This adds an option which enables package installation via Yum when Puppet executes. Users might want to disable Yum installation of packages via puppet when using pre-installed images. The option is off by default: meaning that Puppet will no longer install packages by default. Users will need to enable the EnablePackageInstall in order to get the previous behavior. The intent is to use the default_parameters section of the Heat environment to allow users to cleanly enable this features without wiring it into the top level. This is because the new parameter is Puppet specific and doesn't really apply to other implementations. Kilo Heat already has support for default_parameters and so does python-heatclient. NOTE: most TripleO users do not yet have the heatclient features because setup-clienttools in tripleo-incubator only installs releases via pip. It is for these reasons the default_parameters section in overcloud-resource-registry-puppet.yaml is commented out for now. Change-Id: I3af71b801b87d080b367d9e4a1fb44c1bfea6e87 --- puppet/overcloud_object.pp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'puppet/overcloud_object.pp') diff --git a/puppet/overcloud_object.pp b/puppet/overcloud_object.pp index d415c23a..c407afad 100644 --- a/puppet/overcloud_object.pp +++ b/puppet/overcloud_object.pp @@ -13,6 +13,16 @@ # License for the specific language governing permissions and limitations # under the License. +if !str2bool(hiera('enable_package_install', 'false')) { + case $::osfamily { + 'RedHat': { + Package { provider => 'norpm' } # provided by tripleo-puppet + } + default: { + warning('enable_package_install option not supported.') + } + } +} include ::ntp include ::swift -- cgit 1.2.3-korg