Index: modules/sitescripts/manifests/init.pp |
diff --git a/modules/sitescripts/manifests/init.pp b/modules/sitescripts/manifests/init.pp |
index 18795394d6825b442d84f654c47747060601f670..246290193112290af86d2e1a0eba1f8bdff3b0d3 100644 |
--- a/modules/sitescripts/manifests/init.pp |
+++ b/modules/sitescripts/manifests/init.pp |
@@ -3,14 +3,16 @@ class sitescripts ( |
$sitescriptsini_content = '', |
){ |
- concat {'/etc/sitescripts.ini': |
+ @concat {'/etc/sitescripts.ini': |
mode => 644, |
owner => root, |
group => root, |
} |
- define configfragment($content = '', $source = '') |
- { |
+ define configfragment($content = '', $source = '') { |
+ |
+ realize(Concat['/etc/sitescripts.ini']) |
+ |
concat::fragment {"/etc/sitescripts.ini#$title": |
target => '/etc/sitescripts.ini', |
content => $content, |
@@ -21,9 +23,12 @@ class sitescripts ( |
} |
} |
- configfragment {'/etc/sitescripts.ini': |
- content => $sitescriptsini_content, |
- source => $sitescriptsini_source, |
+ if ($sitescriptsini_source != '') or ($sitescriptsini_content != '') { |
+ |
+ configfragment {'/etc/sitescripts.ini': |
+ content => $sitescriptsini_content, |
+ source => $sitescriptsini_source, |
+ } |
} |
$configfragments = hiera('sitescripts::configfragments', {}) |