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

Side by Side Diff: modules/sitescripts/manifests/init.pp

Issue 29438564: #301 - Provision formmail templates with absolute paths (Closed)
Patch Set: New approach based on previous comments Created March 7, 2018, 3:57 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 class sitescripts ( 1 class sitescripts (
2 $directory = {},
2 $sitescriptsini_source = '', 3 $sitescriptsini_source = '',
3 $sitescriptsini_content = '', 4 $sitescriptsini_content = '',
4 ){ 5 ){
5 6
6 ensure_resource('adblockplus::sitescripts::repository', 'sitescripts') 7 ensure_resource('adblockplus::sitescripts::repository', 'sitescripts')
7 8
9 ensure_resource('file', $title, merge({
10 'ensure' => 'directory',
11 'path' => '/var/sitescripts',
12 }, $directory))
13
14 $directory_path = getparam(File[$title], 'path')
15
8 @concat {'/etc/sitescripts.ini': 16 @concat {'/etc/sitescripts.ini':
9 mode => '644', 17 mode => '644',
10 owner => root, 18 owner => root,
11 group => root, 19 group => root,
12 } 20 }
13 21
14 define configfragment($content = '', $source = '') { 22 define configfragment($content = '', $source = '') {
15 23
16 realize(Concat['/etc/sitescripts.ini']) 24 realize(Concat['/etc/sitescripts.ini'])
17 25
(...skipping 19 matching lines...) Expand all
37 } 45 }
38 46
39 configfragment {'/etc/sitescripts.ini': 47 configfragment {'/etc/sitescripts.ini':
40 content => $content, 48 content => $content,
41 source => $source, 49 source => $source,
42 } 50 }
43 51
44 $configfragments = hiera('sitescripts::configfragments', {}) 52 $configfragments = hiera('sitescripts::configfragments', {})
45 create_resources('sitescripts::configfragment', $configfragments) 53 create_resources('sitescripts::configfragment', $configfragments)
46 } 54 }
OLDNEW
« modules/sitescripts/manifests/formmail.pp ('K') | « modules/sitescripts/manifests/formmail.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld