Filippo Giunchedi has submitted this change and it was merged.

Change subject: contint: migrate to require_package()
......................................................................


contint: migrate to require_package()

We have a few package definition conflicts in the contint module which
were previously handled with:

    if ! defined ( Package['openjdk-6-jdk'] ) {
        package { 'openjdk-6-jdk': ensure => present }
    }

Switch to require_package instead ie:

    require_package('openjdk-6-jdk')

Change-Id: Ib99ad3026efca924b5fabe4aa8a1333a683b63cf
---
M modules/contint/manifests/packages.pp
M modules/contint/manifests/publish-console.pp
2 files changed, 5 insertions(+), 17 deletions(-)

Approvals:
  Krinkle: Looks good to me, but someone else must approve
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/modules/contint/manifests/packages.pp 
b/modules/contint/manifests/packages.pp
index 5b3ed0b..7ff37a5 100644
--- a/modules/contint/manifests/packages.pp
+++ b/modules/contint/manifests/packages.pp
@@ -22,12 +22,8 @@
     # applications.
     # (openjdk is the default distribution for the java define.
     # The java define is found in modules/java/manifests/init.pp )
-    if ! defined ( Package['openjdk-6-jdk'] ) {
-        package { 'openjdk-6-jdk': ensure => present }
-    }
-    if ! defined ( Package['openjdk-7-jdk'] ) {
-        package { 'openjdk-7-jdk': ensure => present }
-    }
+    require_package('openjdk-6-jdk')
+    require_package('openjdk-7-jdk')
 
     package { 'maven2':
         ensure => present,
@@ -94,11 +90,7 @@
     # For Doxygen based documentations
     require_package('graphviz')
 
-    if ! defined ( Package['python-requests'] ) {
-        package { 'python-requests':
-            ensure => present,
-        }
-    }
+    require_package('python-requests')
 
     # Node.js evolves quickly so we want to update automatically.
     require_package('nodejs')
diff --git a/modules/contint/manifests/publish-console.pp 
b/modules/contint/manifests/publish-console.pp
index 1f76a96..92aea0e 100644
--- a/modules/contint/manifests/publish-console.pp
+++ b/modules/contint/manifests/publish-console.pp
@@ -3,11 +3,7 @@
 # https://integration.wikimedia.org/logs/
 class contint::publish-console {
 
-    # publish-console.py dependencies
-    if ! defined ( Package['python-requests'] ) {
-        package { 'python-requests':
-            ensure => present,
-        }
-    }
+    # publish-console.py dependency
+    require_package('python-requests')
 
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/188034
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib99ad3026efca924b5fabe4aa8a1333a683b63cf
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <has...@free.fr>
Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: ArielGlenn <ar...@wikimedia.org>
Gerrit-Reviewer: Faidon Liambotis <fai...@wikimedia.org>
Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Manybubbles <never...@wikimedia.org>
Gerrit-Reviewer: Mark Bergsma <m...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to