From 95a58385840476ddbe29f2465285fd6908fa87b8 Mon Sep 17 00:00:00 2001 From: chr1s692 Date: Thu, 8 Jul 2021 12:51:37 +0200 Subject: [PATCH 1/2] file foreman::app_root optional Currently we're using your modul to install and configure Foreman. We want to install Foreman in its own filesystem, but the file ressource for $foreman::app_root makes it hard to implement this in puppet - it will always result in duplicate ressource. Furthermore i'm not sure, if this ressource is necessary or placed in the right class (ordering, first install the package and then create the directory?!). Testing if this directory is already defined gives other the chance to do some stuff, e.g. creating a filesystem before installing foreman :) --- manifests/config.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index bf45b5788..ca95b0751 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -49,9 +49,11 @@ unit => "${foreman::foreman_service}.service", content => template('foreman/foreman.service-overrides.erb'), } - - file { $foreman::app_root: - ensure => directory, + + if ! defined(File[$foreman::app_root]) { + file { $foreman::app_root: + ensure => directory, + } } if $foreman::db_root_cert { From 0c29546ce82281946cb2b4830b9e8d9dde5909da Mon Sep 17 00:00:00 2001 From: chr1s692 Date: Thu, 8 Jul 2021 14:23:34 +0200 Subject: [PATCH 2/2] remove trailing white spaces --- manifests/config.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/config.pp b/manifests/config.pp index ca95b0751..4dcef6260 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -49,7 +49,7 @@ unit => "${foreman::foreman_service}.service", content => template('foreman/foreman.service-overrides.erb'), } - + if ! defined(File[$foreman::app_root]) { file { $foreman::app_root: ensure => directory,