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

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

Issue 29469597: #1634 - Update file resource syntax in module downloadserver (Closed)
Patch Set: Created June 20, 2017, 4:50 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 downloadserver( 1 class downloadserver(
2 $domain, 2 $domain,
3 $certificate, 3 $certificate,
4 $private_key, 4 $private_key,
5 $is_default = false 5 $is_default = false
6 ) { 6 ) {
7 7
8 class {'nginx': 8 class {'nginx':
9 worker_connections => 4000, 9 worker_connections => 4000,
10 ssl_session_cache => off, 10 ssl_session_cache => off,
(...skipping 22 matching lines...) Expand all
33 user {'hg': 33 user {'hg':
34 ensure => present, 34 ensure => present,
35 comment => 'Mercurial client user', 35 comment => 'Mercurial client user',
36 home => '/home/hg', 36 home => '/home/hg',
37 managehome => true 37 managehome => true
38 } 38 }
39 39
40 file {'/var/www': 40 file {'/var/www':
41 ensure => directory, 41 ensure => directory,
42 owner => hg, 42 owner => hg,
43 mode => 0644 43 mode => '0644'
44 } 44 }
45 45
46 exec { "fetch_downloads": 46 exec { "fetch_downloads":
47 command => "hg clone https://hg.adblockplus.org/downloads /var/www/downloads ", 47 command => "hg clone https://hg.adblockplus.org/downloads /var/www/downloads ",
48 path => ["/usr/bin/", "/bin/"], 48 path => ["/usr/bin/", "/bin/"],
49 require => Package['mercurial'], 49 require => Package['mercurial'],
50 user => hg, 50 user => hg,
51 timeout => 0, 51 timeout => 0,
52 onlyif => "test ! -d /var/www/downloads" 52 onlyif => "test ! -d /var/www/downloads"
53 } 53 }
54 54
55 File { 55 File {
56 owner => root, 56 owner => root,
57 group => root, 57 group => root,
58 mode => 0644, 58 mode => '0644',
59 } 59 }
60 60
61 nginx::hostconfig{$domain: 61 nginx::hostconfig{$domain:
62 source => 'puppet:///modules/downloadserver/site.conf', 62 source => 'puppet:///modules/downloadserver/site.conf',
63 is_default => $is_default, 63 is_default => $is_default,
64 certificate => $certificate, 64 certificate => $certificate,
65 private_key => $private_key, 65 private_key => $private_key,
66 log => 'access_log_downloads' 66 log => 'access_log_downloads'
67 } 67 }
68 68
(...skipping 19 matching lines...) Expand all
88 user {'rsync': 88 user {'rsync':
89 ensure => present, 89 ensure => present,
90 home => '/home/rsync', 90 home => '/home/rsync',
91 managehome => true 91 managehome => true
92 } 92 }
93 93
94 file {'/home/rsync/.ssh': 94 file {'/home/rsync/.ssh':
95 ensure => directory, 95 ensure => directory,
96 require => User['rsync'], 96 require => User['rsync'],
97 owner => rsync, 97 owner => rsync,
98 mode => 0600; 98 mode => '0600';
99 } 99 }
100 100
101 file {'/home/rsync/.ssh/id_rsa': 101 file {'/home/rsync/.ssh/id_rsa':
102 ensure => file, 102 ensure => file,
103 owner => rsync, 103 owner => rsync,
104 mode => 0400, 104 mode => '0400',
105 source => 'puppet:///modules/private/rsync@downloads.adblockplus.org' 105 source => 'puppet:///modules/private/rsync@downloads.adblockplus.org'
106 } 106 }
107 107
108 file {'/home/rsync/.ssh/id_rsa.pub': 108 file {'/home/rsync/.ssh/id_rsa.pub':
109 ensure => file, 109 ensure => file,
110 owner => rsync, 110 owner => rsync,
111 mode => 0400, 111 mode => '0400',
112 source => 'puppet:///modules/private/rsync@downloads.adblockplus.org.pub' 112 source => 'puppet:///modules/private/rsync@downloads.adblockplus.org.pub'
113 } 113 }
114 114
115 cron {'mirror-devbuilds': 115 cron {'mirror-devbuilds':
116 ensure => present, 116 ensure => present,
117 require => [File['/home/rsync/.ssh/id_rsa'], 117 require => [File['/home/rsync/.ssh/id_rsa'],
118 File['/var/www/devbuilds']], 118 File['/var/www/devbuilds']],
119 command => 'rsync -e ssh -ltprz --delete devbuilds@server16.adblockplus.org: . /var/www/devbuilds', 119 command => 'rsync -e ssh -ltprz --delete devbuilds@server16.adblockplus.org: . /var/www/devbuilds',
120 environment => hiera('cron::environment', []), 120 environment => hiera('cron::environment', []),
121 user => rsync, 121 user => rsync,
122 hour => '*', 122 hour => '*',
123 minute => '4-54/10' 123 minute => '4-54/10'
124 } 124 }
125 } 125 }
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