Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/sitescripts/manifests/init.pp

Issue 6122106488094720: Issue 1495 - Introduce $sitescriptsini_content in Puppet sitescripts module (Closed)
Patch Set: Created Nov. 26, 2014, 2:14 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/sitescripts/manifests/init.pp
===================================================================
--- a/modules/sitescripts/manifests/init.pp
+++ b/modules/sitescripts/manifests/init.pp
@@ -1,5 +1,6 @@
class sitescripts (
- $sitescriptsini_source = undef
+ $sitescriptsini_source = '',
+ $sitescriptsini_content = '',
){
concat {'/etc/sitescripts.ini':
@@ -8,15 +9,22 @@
group => root,
}
- define configfragment($source = $title)
+ define configfragment($content = '', $source = '')
{
- concat::fragment {$source:
- target => '/etc/sitescripts.ini',
- source => $source
+ concat::fragment {"/etc/sitescripts.ini#$title":
+ target => '/etc/sitescripts.ini',
+ content => $content,
+ source => "$source;$content" ? {
+ ';' => $title,
Wladimir Palant 2014/11/26 22:47:09 Why not: source => "$source$content" ? { ''
mathias 2014/11/26 23:34:29 I would agree on "more common" rather than "more o
Wladimir Palant 2014/12/08 16:44:00 I do :) In fact, I asked Sebastian as somebody wh
mathias 2014/12/10 12:51:05 Done.
+ default => $source,
+ }
}
}
- configfragment {$sitescriptsini_source: }
+ configfragment {'/etc/sitescripts.ini':
+ content => $sitescriptsini_content,
+ source => $sitescriptsini_source,
+ }
exec { "fetch_sitescripts":
command => "hg clone https://hg.adblockplus.org/sitescripts /opt/sitescripts",
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld