From a2a2acdcaf9db8536d0d168f298cd6938ce50f06 Mon Sep 17 00:00:00 2001 From: Brian Sipos Date: Wed, 3 Apr 2024 13:49:53 -0400 Subject: [PATCH] Fixing puppet-lint issues --- puppet/modules/anms/manifests/docker.pp | 4 ++-- puppet/modules/anms/manifests/docker_compose.pp | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/puppet/modules/anms/manifests/docker.pp b/puppet/modules/anms/manifests/docker.pp index d6b276d..bda0074 100644 --- a/puppet/modules/anms/manifests/docker.pp +++ b/puppet/modules/anms/manifests/docker.pp @@ -9,8 +9,8 @@ ensure => 'absent', before => Package['docker-ce'], } - } + default: {} } package { 'yum-utils': @@ -20,7 +20,7 @@ ensure => 'absent', } exec { 'yum-repo-docker-ce': - path => $::path, + path => $facts['path'], command => 'yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo', creates => '/etc/yum.repos.d/docker-ce.repo', } diff --git a/puppet/modules/anms/manifests/docker_compose.pp b/puppet/modules/anms/manifests/docker_compose.pp index 148f07e..cb518dc 100644 --- a/puppet/modules/anms/manifests/docker_compose.pp +++ b/puppet/modules/anms/manifests/docker_compose.pp @@ -18,16 +18,19 @@ case $ensure { 'present': { exec { "docker-compose-${title}-up": - path => $::path, - command => "docker compose -p ${title} -f ${files_args} up --detach --remove-orphans ${up_args}", + path => $facts['path'], + command => "docker compose -p ${title} -f ${files_args} up --detach --remove-orphans ${up_args}", } } 'absent': { exec { "docker-compose-${title}-up": - path => $::path, + path => $facts['path'], command => "docker compose -p ${title} -f ${files_args} rm --force --stop", - onlyif => $is_running, + onlyif => $is_running, } } + default: { + fail("Invalid ensure argument: ${ensure}") + } } } \ No newline at end of file