From 053c64e92e74f686b4fbeb9dd17cdbdacff64976 Mon Sep 17 00:00:00 2001 From: Nathan Carlson Date: Thu, 13 Jun 2024 09:58:29 -0500 Subject: [PATCH] De-duplicate code for package installation --- manifests/compose.pp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/manifests/compose.pp b/manifests/compose.pp index fb80a2fd..32637a00 100644 --- a/manifests/compose.pp +++ b/manifests/compose.pp @@ -30,20 +30,12 @@ true => [Apt::Source['docker'], Class['apt::update']], false => undef, } - package { 'docker-compose-plugin': - ensure => $package_ensure, - require => $_require, - } } 'RedHat': { $_require = $docker::use_upstream_package_source ? { true => Yumrepo['docker'], false => undef, } - package { 'docker-compose-plugin': - ensure => $package_ensure, - require => $_require, - } } 'Windows': { fail('The docker compose portion of this module is not supported on Windows') @@ -52,5 +44,9 @@ fail('The docker compose portion of this module only works on Debian or RedHat') } } + package { 'docker-compose-plugin': + ensure => $package_ensure, + require => $_require, + } } }