diff options
author | Dan Prince <dprince@redhat.com> | 2015-02-04 21:45:44 -0500 |
---|---|---|
committer | Dan Prince <dprince@redhat.com> | 2015-02-05 10:12:48 -0500 |
commit | f8a9c530e0694b956fb5819dd46e38380ecc58e2 (patch) | |
tree | 70873d123e0a4e579401da915fe4df41533684a9 /puppet | |
parent | 6ba5a410628bcc611923f798baa807ef799178d5 (diff) |
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
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/loadbalancer.pp | 11 | ||||
-rw-r--r-- | puppet/overcloud_compute.pp | 11 | ||||
-rw-r--r-- | puppet/overcloud_controller.pp | 11 | ||||
-rw-r--r-- | puppet/overcloud_object.pp | 10 | ||||
-rw-r--r-- | puppet/overcloud_volume.pp | 11 | ||||
-rw-r--r-- | puppet/ringbuilder.pp | 11 |
6 files changed, 65 insertions, 0 deletions
diff --git a/puppet/loadbalancer.pp b/puppet/loadbalancer.pp index 84598da6..88e6bdd4 100644 --- a/puppet/loadbalancer.pp +++ b/puppet/loadbalancer.pp @@ -13,6 +13,17 @@ # 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.') + } + } +} + class tripleo::loadbalancer ( $keystone_admin = false, $keystone_public = false, diff --git a/puppet/overcloud_compute.pp b/puppet/overcloud_compute.pp index 693a06b3..2ff31be2 100644 --- a/puppet/overcloud_compute.pp +++ b/puppet/overcloud_compute.pp @@ -13,6 +13,17 @@ # 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 class { 'nova': diff --git a/puppet/overcloud_controller.pp b/puppet/overcloud_controller.pp index 6af54a5e..acfea686 100644 --- a/puppet/overcloud_controller.pp +++ b/puppet/overcloud_controller.pp @@ -13,6 +13,17 @@ # 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.') + } + } +} + if hiera('step') >= 1 { include ::ntp 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 diff --git a/puppet/overcloud_volume.pp b/puppet/overcloud_volume.pp index 91566bb2..9351d708 100644 --- a/puppet/overcloud_volume.pp +++ b/puppet/overcloud_volume.pp @@ -13,6 +13,17 @@ # License for the specific language governing permissions and limitations # under the License. +if str2bool(hiera('disable_package_install', 'false')) { + case $::osfamily { + 'RedHat': { + Package { provider => 'norpm' } # provided by tripleo-puppet + } + default: { + warning('disable_package_install option not supported.') + } + } +} + include ::ntp include ::cinder diff --git a/puppet/ringbuilder.pp b/puppet/ringbuilder.pp index 85f7eea5..531706d2 100644 --- a/puppet/ringbuilder.pp +++ b/puppet/ringbuilder.pp @@ -13,6 +13,17 @@ # License for the specific language governing permissions and limitations # under the License. +if str2bool(hiera('disable_package_install', 'false')) { + case $::osfamily { + 'RedHat': { + Package { provider => 'norpm' } # provided by tripleo-puppet + } + default: { + warning('disable_package_install option not supported.') + } + } +} + define add_devices( $swift_zones = '1' ){ |