From 95eaa192ba4cb3e033af688a931580767a28cdaf Mon Sep 17 00:00:00 2001 From: Magnus Andersson Date: Wed, 24 Jan 2024 17:17:28 +0100 Subject: [PATCH] Only let puppet manage runnerdata resource if it does not exist --- manifests/runner.pp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/manifests/runner.pp b/manifests/runner.pp index b61898d..d2a4ad3 100644 --- a/manifests/runner.pp +++ b/manifests/runner.pp @@ -63,11 +63,13 @@ class podmanrunner::runner ( mode => '0400', } - file { "/opt/${username}${x}/runnerdata": - ensure => directory, - mode => '0700', - #owner => "${username}${x}", - #group => "${username}${x}", + unless File["/opt/${username}${x}/runnerdata"] { + file { "/opt/${username}${x}/runnerdata": + ensure => directory, + mode => '0700', + owner => "${username}${x}", + group => "${username}${x}", + } } file { "/opt/${username}${x}/runnerdata/config.yml":