Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/290999
Change subject: raid: vary package installation on the RAID installed ...................................................................... raid: vary package installation on the RAID installed Installing all RAID controller packages on all hosts is kind of a waste. Use the newly-written $raid fact to differentiate systems based on what kind of RAID controller they have installed and install the appropriate packages. Bug: T84050 Change-Id: Ia16b7ad8ad281640fe18fe77cb781d2480af54dc --- M modules/raid/manifests/init.pp 1 file changed, 33 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/290999/1 diff --git a/modules/raid/manifests/init.pp b/modules/raid/manifests/init.pp index 4219606..7e6ee8e 100644 --- a/modules/raid/manifests/init.pp +++ b/modules/raid/manifests/init.pp @@ -9,17 +9,41 @@ # include raid class raid { - package { [ 'megacli', 'arcconf', 'mpt-status', 'hpssacli' ]: - ensure => 'latest', + # this line can be removed entirely on a system with: + # - Facter >= 2.0 + # - Puppet with stringify_facts=false (if supported) + $raid = split($::raid, ',') + + if 'megaraid' in $raid { + require_package('megacli') } - file { '/etc/default/mpt-statusd': - ensure => present, - owner => 'root', - group => 'root', - mode => '0555', - content => "RUN_DAEMON=no\n", - before => Package['mpt-status'], + if 'hpsa' in $raid { + require_package('hpssacli') + } + + if 'mpt' in $raid { + require_package('mpt-status') + + file { '/etc/default/mpt-statusd': + ensure => present, + owner => 'root', + group => 'root', + mode => '0555', + content => "RUN_DAEMON=no\n", + before => Package['mpt-status'], + } + } + if 'md' in $raid { + # if there is an "md" RAID configured, mdadm is already installed + } + + if 'arcconf' in $raid { + require_package('arcconf') + } + + if 'twe' in $raid { + require_package('tw-cli') } file { '/usr/local/bin/check-raid.py': -- To view, visit https://gerrit.wikimedia.org/r/290999 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia16b7ad8ad281640fe18fe77cb781d2480af54dc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis <fai...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits