Herron has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/385999 )
Change subject: WIP: add puppet package version paramater to puppetmaster module ...................................................................... WIP: add puppet package version paramater to puppetmaster module Add paramater to allow more granular selection of puppet package version Change-Id: I18586d907153606e185cea8061ea478eccce4371 --- M hieradata/role/codfw/puppetmaster/frontend.yaml M modules/profile/manifests/puppetmaster/frontend.pp M modules/puppetmaster/manifests/init.pp 3 files changed, 27 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/385999/1 diff --git a/hieradata/role/codfw/puppetmaster/frontend.yaml b/hieradata/role/codfw/puppetmaster/frontend.yaml index e124b99..c7705b5 100644 --- a/hieradata/role/codfw/puppetmaster/frontend.yaml +++ b/hieradata/role/codfw/puppetmaster/frontend.yaml @@ -1 +1,2 @@ profile::puppetmaster::common::puppetdb_host: nihal.codfw.wmnet +profile::puppetmaster::common::puppet_package_version: 4.8.2-5~bpo8+1 diff --git a/modules/profile/manifests/puppetmaster/frontend.pp b/modules/profile/manifests/puppetmaster/frontend.pp index ee86a8c..f86242d 100644 --- a/modules/profile/manifests/puppetmaster/frontend.pp +++ b/modules/profile/manifests/puppetmaster/frontend.pp @@ -45,15 +45,16 @@ } class { '::puppetmaster': - bind_address => '*', - server_type => 'frontend', - is_git_master => true, - workers => $workers, - config => $::profile::puppetmaster::common::config, - secure_private => $secure_private, - prevent_cherrypicks => $prevent_cherrypicks, - allow_from => $allow_from, - extra_auth_rules => $extra_auth_rules, + bind_address => '*', + server_type => 'frontend', + is_git_master => true, + workers => $workers, + config => $::profile::puppetmaster::common::config, + secure_private => $secure_private, + prevent_cherrypicks => $prevent_cherrypicks, + allow_from => $allow_from, + extra_auth_rules => $extra_auth_rules, + puppet_package_version => hiera('::profile::puppetmaster::common::puppet_package_version', undef), } # Main site to respond to diff --git a/modules/puppetmaster/manifests/init.pp b/modules/puppetmaster/manifests/init.pp index b7bdafe..1584ad9 100644 --- a/modules/puppetmaster/manifests/init.pp +++ b/modules/puppetmaster/manifests/init.pp @@ -33,9 +33,11 @@ # Bool - use git hooks to prevent cherry picking on top of the git repo # - $git_user # String - name of user who should own the git repositories -# # - $git_group # String - name of group which should own the git repositories +# - $puppet_package_version +# String - version of puppet packages to ensure. defaults to "present" + class puppetmaster( $server_name='puppet', $bind_address='*', @@ -58,6 +60,7 @@ $prevent_cherrypicks=true, $git_user='gitpuppet', $git_group='gitpuppet', + $puppet_package_version=undef, ){ $gitdir = '/var/lib/git' @@ -76,12 +79,24 @@ require_package('puppetdb-terminus') } + # If puppet_package_version paramater was supplied set + # puppet_package_ensure accordingly. otherwise default to "present" + if $puppet_package_version { + $puppet_package_ensure = $puppet_package_version + } else { + $puppet_package_ensure = 'present' + } package { [ 'puppetmaster', 'puppetmaster-common', 'vim-puppet', 'puppet-el', + ]: + ensure => $puppet_package_ensure, + } + + package { [ 'rails', 'ruby-json', 'ruby-mysql', -- To view, visit https://gerrit.wikimedia.org/r/385999 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I18586d907153606e185cea8061ea478eccce4371 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Herron <kher...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits