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

Delta Between Two Patch Sets: modules/sitescripts/manifests/init.pp

Issue 29363535: Issue 2313 - Handle Flup dependency in module sitescripts (Closed)
Left Patch Set: Created Nov. 18, 2016, 9:47 a.m.
Right Patch Set: Issue 2313 - Handle Flup dependency in module sitescripts Created Nov. 18, 2016, 3:39 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « modules/notificationserver/manifests/init.pp ('k') | modules/updateserver/manifests/init.pp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 class sitescripts ( 1 class sitescripts (
2 $sitescriptsini_source = '', 2 $sitescriptsini_source = '',
3 $sitescriptsini_content = '', 3 $sitescriptsini_content = '',
4 ){ 4 ){
5 5
6 @concat {'/etc/sitescripts.ini': 6 @concat {'/etc/sitescripts.ini':
7 mode => 644, 7 mode => 644,
8 owner => root, 8 owner => root,
9 group => root, 9 group => root,
10 } 10 }
11 11
12 define configfragment($content = '', $source = '') { 12 define configfragment($content = '', $source = '') {
13 13
14 realize(Concat['/etc/sitescripts.ini']) 14 realize(Concat['/etc/sitescripts.ini'])
15 15
16 concat::fragment {"/etc/sitescripts.ini#$title": 16 concat::fragment {"/etc/sitescripts.ini#$title":
17 target => '/etc/sitescripts.ini', 17 target => '/etc/sitescripts.ini',
18 content => $content, 18 content => $content,
19 source => "$source$content" ? { 19 source => "$source$content" ? {
20 '' => $title, 20 '' => $title,
21 default => $source, 21 default => $source,
22 } 22 }
23 } 23 }
24 } 24 }
25 25
26 package {'python-flup':} 26 ensure_packages(['python-flup'])
mathias 2016/11/18 10:59:03 Please always use ensure_packages from stdlib when
27 27
28 if ($sitescriptsini_source != '') or ($sitescriptsini_content != '') { 28 if ($sitescriptsini_source != '') or ($sitescriptsini_content != '') {
29 29
30 $content = $sitescriptsini_content 30 $content = $sitescriptsini_content
31 $source = $sitescriptsini_source 31 $source = $sitescriptsini_source
32 } 32 }
33 else { 33 else {
34 34
35 $content = "# Puppet: Class['$title']\n" 35 $content = "# Puppet: Class['$title']\n"
36 $source = '' 36 $source = ''
37 } 37 }
(...skipping 14 matching lines...) Expand all
52 } 52 }
53 53
54 cron {"update_sitescripts": 54 cron {"update_sitescripts":
55 ensure => present, 55 ensure => present,
56 command => "hg pull -q -u -R /opt/sitescripts && /opt/sitescripts/ensure_dep endencies.py -q", 56 command => "hg pull -q -u -R /opt/sitescripts && /opt/sitescripts/ensure_dep endencies.py -q",
57 environment => hiera('cron::environment', []), 57 environment => hiera('cron::environment', []),
58 user => root, 58 user => root,
59 require => Exec["fetch_sitescripts"], 59 require => Exec["fetch_sitescripts"],
60 } 60 }
61 } 61 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld