Explorar o código

Merge pull request #851 from Barzahlen/master

Conditionally adding the packages if they are not added previously
Matthew Haughton %!s(int64=7) %!d(string=hai) anos
pai
achega
2b566d04c9
Modificáronse 1 ficheiros con 3 adicións e 4 borrados
  1. 3 4
      manifests/package/debian.pp

+ 3 - 4
manifests/package/debian.pp

@@ -53,10 +53,9 @@ class nginx::package::debian(
           key      => '16378A33A6EF16762922526E561F9B9CAC40B2F7',
         }
 
-        package { ['apt-transport-https', 'ca-certificates']:
-          ensure => 'present',
-          before => Apt::Source['nginx'],
-        }
+        ensure_packages([ 'apt-transport-https', 'ca-certificates' ])
+
+        Apt::Source['nginx'] -> Package['apt-transport-https','ca-certificates']
 
         package { 'passenger':
           ensure  => 'present',