From 4f88464a62e72a0a53b081edfe4e2a5f95f333b1 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Thu, 18 Jun 2015 22:05:00 -0400 Subject: Puppet: wire in tripleo::packages This wires in use of a new puppet-tripleo class which encapsulates the logic to enable/disable package installation and upgrades. By using the new class we can remove the global Package provider declaration at the top of each module. Change-Id: I5c6e5fd8600031bd8fb6195649721607c560f9d5 Depends-on: Ie8fbc344149bc8c9977e127de77636903607617a --- puppet/ceph-storage-puppet.yaml | 2 +- puppet/cinder-storage-puppet.yaml | 2 +- puppet/compute-puppet.yaml | 2 +- puppet/controller-puppet.yaml | 2 +- puppet/manifests/overcloud_cephstorage.pp | 11 +---------- puppet/manifests/overcloud_compute.pp | 11 +---------- puppet/manifests/overcloud_controller.pp | 11 +---------- puppet/manifests/overcloud_controller_pacemaker.pp | 11 +---------- puppet/manifests/overcloud_object.pp | 11 +---------- puppet/manifests/overcloud_volume.pp | 11 +---------- puppet/manifests/ringbuilder.pp | 11 +---------- puppet/swift-storage-puppet.yaml | 2 +- 12 files changed, 12 insertions(+), 75 deletions(-) (limited to 'puppet') diff --git a/puppet/ceph-storage-puppet.yaml b/puppet/ceph-storage-puppet.yaml index 2d089419..ccbd277d 100644 --- a/puppet/ceph-storage-puppet.yaml +++ b/puppet/ceph-storage-puppet.yaml @@ -129,7 +129,7 @@ resources: raw_data: {get_file: hieradata/ceph.yaml} mapped_data: ntp::servers: {get_input: ntp_servers} - enable_package_install: {get_input: enable_package_install} + tripleo::packages::enable_install: {get_input: enable_package_install} ceph::profile::params::cluster_network: {get_input: ceph_cluster_network} ceph::profile::params::public_network: {get_input: ceph_public_network} diff --git a/puppet/cinder-storage-puppet.yaml b/puppet/cinder-storage-puppet.yaml index 94a0a5c4..77d0cee5 100644 --- a/puppet/cinder-storage-puppet.yaml +++ b/puppet/cinder-storage-puppet.yaml @@ -258,7 +258,7 @@ resources: cinder_iscsi_ip_address: {get_input: cinder_iscsi_ip_address} cinder::glance::glance_api_servers: {get_input: glance_api_servers} ntp::servers: {get_input: ntp_servers} - enable_package_install: {get_input: enable_package_install} + tripleo::packages::enable_install: {get_input: enable_package_install} snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name} snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password} diff --git a/puppet/compute-puppet.yaml b/puppet/compute-puppet.yaml index 02756925..45c845a8 100644 --- a/puppet/compute-puppet.yaml +++ b/puppet/compute-puppet.yaml @@ -406,7 +406,7 @@ resources: neutron_public_interface_raw_device: {get_input: neutron_public_interface_raw_device} admin_password: {get_input: admin_password} ntp::servers: {get_input: ntp_servers} - enable_package_install: {get_input: enable_package_install} + tripleo::packages::enable_install: {get_input: enable_package_install} NovaComputeDeployment: type: OS::TripleO::SoftwareDeployment diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index bd8823ad..1271ca97 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -1074,7 +1074,7 @@ resources: public_virtual_interface: {get_input: public_virtual_interface} tripleo::loadbalancer::control_virtual_interface: {get_input: control_virtual_interface} tripleo::loadbalancer::public_virtual_interface: {get_input: public_virtual_interface} - enable_package_install: {get_input: enable_package_install} + tripleo::packages::enable_install: {get_input: enable_package_install} # Hook for site-specific additional pre-deployment config, e.g extra hieradata ControllerExtraConfigPre: diff --git a/puppet/manifests/overcloud_cephstorage.pp b/puppet/manifests/overcloud_cephstorage.pp index 21fd5f98..cf2626ac 100644 --- a/puppet/manifests/overcloud_cephstorage.pp +++ b/puppet/manifests/overcloud_cephstorage.pp @@ -13,16 +13,7 @@ # 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 tripleo::packages create_resources(sysctl::value, hiera('sysctl_settings'), {}) diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp index f7dd61d6..d36cf0b0 100644 --- a/puppet/manifests/overcloud_compute.pp +++ b/puppet/manifests/overcloud_compute.pp @@ -13,16 +13,7 @@ # 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 tripleo::packages create_resources(sysctl::value, hiera('sysctl_settings'), {}) diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index f17dc831..7bdbe519 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -13,16 +13,7 @@ # 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 tripleo::packages if hiera('step') >= 1 { diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index e739ca03..66a86a35 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -18,16 +18,7 @@ Pcmk_resource <| |> { try_sleep => 3, } -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 tripleo::packages if $::hostname == downcase(hiera('bootstrap_nodeid')) { $pacemaker_master = true diff --git a/puppet/manifests/overcloud_object.pp b/puppet/manifests/overcloud_object.pp index ed2ca7c0..59db696e 100644 --- a/puppet/manifests/overcloud_object.pp +++ b/puppet/manifests/overcloud_object.pp @@ -13,16 +13,7 @@ # 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 tripleo::packages create_resources(sysctl::value, hiera('sysctl_settings'), {}) diff --git a/puppet/manifests/overcloud_volume.pp b/puppet/manifests/overcloud_volume.pp index f5c9ae5d..d1f6d6a5 100644 --- a/puppet/manifests/overcloud_volume.pp +++ b/puppet/manifests/overcloud_volume.pp @@ -13,16 +13,7 @@ # 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 tripleo::packages create_resources(sysctl::value, hiera('sysctl_settings'), {}) diff --git a/puppet/manifests/ringbuilder.pp b/puppet/manifests/ringbuilder.pp index 531706d2..14fbafdd 100644 --- a/puppet/manifests/ringbuilder.pp +++ b/puppet/manifests/ringbuilder.pp @@ -13,16 +13,7 @@ # 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 tripleo::packages define add_devices( $swift_zones = '1' diff --git a/puppet/swift-storage-puppet.yaml b/puppet/swift-storage-puppet.yaml index fb1756b8..dc6ff899 100644 --- a/puppet/swift-storage-puppet.yaml +++ b/puppet/swift-storage-puppet.yaml @@ -150,7 +150,7 @@ resources: tripleo::ringbuilder::build_ring: True snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name} snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password} - enable_package_install: {get_input: enable_package_install} + tripleo::packages::enable_install: {get_input: enable_package_install} SwiftStorageHieraDeploy: -- cgit 1.2.3-korg