Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/147681
Change subject: Fix more duplicate package definition of 'php-apc' between mediawiki and contint ...................................................................... Fix more duplicate package definition of 'php-apc' between mediawiki and contint Instead of adding more if-blocks, use ensure_packages(). We already use this in minimalpuppetagent and zuul/init.pp and does exactly the same, but abstracted by a function. This puts 'imagemagic' (moved into an 'if' as of commit 887bca6) back in the regular list and makes the list use ensure_packages. This same list in mediawiki::packages also contains 'php-apc' (just outside the default diff context). The one in contint::packages is turned into an if (not ensure_packages) because it actually ensures absance (apc is unreliable when used on a server that as frequently and rapidly changing files such as the temporary MediaWiki installs for Jenkins, hence was disabled there). Change-Id: I353938171def53cecabc5d91a1081161e723ba2f --- M modules/contint/manifests/packages.pp M modules/mediawiki/manifests/packages.pp 2 files changed, 11 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/81/147681/1 diff --git a/modules/contint/manifests/packages.pp b/modules/contint/manifests/packages.pp index 72cdc4e..25a748c 100644 --- a/modules/contint/manifests/packages.pp +++ b/modules/contint/manifests/packages.pp @@ -63,7 +63,8 @@ } # Development packages - package { [ + ensure_packages([ + 'imagemagick', 'librsvg2-2', 'librsvg2-bin', @@ -86,16 +87,7 @@ 'doxygen', 'python-sphinx', # python documentation 'ruby-jsduck', - ]: - ensure => present, - } - - # FIXME: This conflicted with mediawiki::packages - if ! defined ( Package['imagemagick'] ) { - package { 'imagemagick': - ensure => present, - } - } + ]) if ! defined ( Package['python-requests'] ) { package { 'python-requests': @@ -164,9 +156,10 @@ } # Uninstalled packages - package { [ - 'php-apc', - ]: ensure => absent, + if ! defined ( Package['php-apc'] ) { + package { 'php-apc': + ensure => absent, + } } # Packages to support use of rspec on puppet modules: diff --git a/modules/mediawiki/manifests/packages.pp b/modules/mediawiki/manifests/packages.pp index 1b8c212..ae374cc 100644 --- a/modules/mediawiki/manifests/packages.pp +++ b/modules/mediawiki/manifests/packages.pp @@ -1,5 +1,7 @@ class mediawiki::packages { - package { [ + + ensure_packages([ + 'imagemagick', 'python-imaging', 'libmemcached10', # XXX still needed? 'libmemcached11', @@ -7,16 +9,7 @@ 'php-pear', 'php5-cli', 'php5-common', - ]: - ensure => present, - } - - # FIXME: This conflicted with contint::packages - if ! defined ( Package['imagemagick'] ) { - package { 'imagemagick': - ensure => present, - } - } + ]) # Standard PHP extensions package { [ -- To view, visit https://gerrit.wikimedia.org/r/147681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I353938171def53cecabc5d91a1081161e723ba2f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Krinkle <krinklem...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits