From 4e1f770cea4d02661e4fde480a139e47405c82f6 Mon Sep 17 00:00:00 2001 From: 7u83 <7u83@mail.ru> Date: Fri, 24 Jul 2020 19:17:43 +0000 Subject: [PATCH] Copy config.ldif file into conf directory only if not already migrated --- manifests/apacheds.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manifests/apacheds.pp b/manifests/apacheds.pp index d4cab74..aeed268 100644 --- a/manifests/apacheds.pp +++ b/manifests/apacheds.pp @@ -71,12 +71,16 @@ define plnxtools::apacheds::instance( ensure => file, content => template ("plnxtools/apacheds/log4j.properties.erb"), }-> - file{"$ads_instances/$title/conf/config.ldif": + file{"/tmp/ads-$title-config.ldif": ensure => file, content => template ("plnxtools/apacheds/config.ldif.erb"), + }-> + exec {"/bin/cp /tmp/ads-$title-config.ldif $ads_instances/$title/conf/config.ldif": + creates => "$ads_instances/$title/conf/config.ldif_migrated" } + $bin_dir = "${plnxtools::apacheds::opt_dir}/${plnxtools::apacheds::appname}/bin" service {"apacheds_${title}":