From 8bd354a0db0812a2e8f032bf726ece27ea89d48d Mon Sep 17 00:00:00 2001 From: David Leib Date: Thu, 11 Aug 2016 11:06:56 +0200 Subject: [PATCH] Conditionally adding the packages if they are not added previously Replaced the not defined statements with a more practical ensure_packages and removed the not defined from passenger becase it should be defined only once --- manifests/package/debian.pp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/manifests/package/debian.pp b/manifests/package/debian.pp index d6beb3e..67564b0 100644 --- a/manifests/package/debian.pp +++ b/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',