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

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

Issue 29377772: Issue 134 - Add condition in precise for geoip-database (Closed)
Patch Set: Created March 1, 2017, 8:22 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # == Class: geoip 1 # == Class: geoip
2 # 2 #
3 # Manage GeoIP (http://dev.maxmind.com/geoip/) databases. 3 # Manage GeoIP (http://dev.maxmind.com/geoip/) databases.
4 # 4 #
5 # === Parameters: 5 # === Parameters:
6 # 6 #
7 # [*cron*] 7 # [*cron*]
8 # Default options for Cron['geoip'], e.g. $minute, $monthday etc. 8 # Default options for Cron['geoip'], e.g. $minute, $monthday etc.
9 # 9 #
10 # [*ensure*] 10 # [*ensure*]
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 $version = undef, 42 $version = undef,
43 ) { 43 ) {
44 44
45 ensure_resource('package', $packages, { 45 ensure_resource('package', $packages, {
46 ensure => $ensure ? { 46 ensure => $ensure ? {
47 /^(absent|purged)$/ => $ensure, 47 /^(absent|purged)$/ => $ensure,
48 default => $version ? {undef => 'present', default => $version}, 48 default => $version ? {undef => 'present', default => $version},
49 }, 49 },
50 }) 50 })
51 51
52 create_resources('cron', {geoip => $cron}, { 52 if $::lsbdistcodename == 'precise' {
53 command => $hook ? {undef => $script, default => "$script && $hook"}, 53 create_resources('cron', {geoip => $cron}, {
54 ensure => $ensure ? {/^(absent|purged)$/ => 'absent', default => 'present'}, 54 command => $hook ? {undef => $script, default => "$script && $hook"},
55 hour => 0, 55 ensure => $ensure ? {/^(absent|purged)$/ => 'absent', default => 'present' },
56 minute => 0, 56 hour => 0,
57 user => 'root', 57 minute => 0,
58 }) 58 user => 'root',
59 })
59 60
60 file {$script: 61 file {$script:
61 before => Cron['geoip'], 62 before => Cron['geoip'],
62 ensure => $ensure ? {/^(absent|purged)$/ => 'absent', default => 'present'}, 63 ensure => $ensure ? {/^(absent|purged)$/ => 'absent', default => 'present' },
63 mode => 0755, 64 mode => 0755,
64 require => Package[$packages], 65 require => Package[$packages],
65 source => 'puppet:///modules/geoip/update.py', 66 source => 'puppet:///modules/geoip/update.py',
67 }
66 } 68 }
67 } 69 }
70
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld