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

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

Issue 29469594: #1634 - Update file resource syntax in module discourse (Closed)
Patch Set: Created June 20, 2017, 4:49 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 discourse( 1 class discourse(
2 $domain, 2 $domain,
3 $certificate, 3 $certificate,
4 $private_key, 4 $private_key,
5 $is_default = false 5 $is_default = false
6 ) inherits private::discourse { 6 ) inherits private::discourse {
7 7
8 class { 'postgresql::globals': 8 class { 'postgresql::globals':
9 manage_package_repo => true, 9 manage_package_repo => true,
10 version => '9.3', 10 version => '9.3',
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 exec {'install-bundler': 65 exec {'install-bundler':
66 command => 'rvm default do gem install bundler', 66 command => 'rvm default do gem install bundler',
67 tag => 'rvm', 67 tag => 'rvm',
68 unless => 'rvm default do gem list | grep "^bundler ")', 68 unless => 'rvm default do gem list | grep "^bundler ")',
69 require => Exec['install-ruby'], 69 require => Exec['install-ruby'],
70 } 70 }
71 71
72 file {'/opt/discourse': 72 file {'/opt/discourse':
73 ensure => directory, 73 ensure => directory,
74 mode => 755, 74 mode => '755',
mathias 2017/06/20 17:04:15 Now that we're at it, can't we make it uniform and
75 owner => discourse, 75 owner => discourse,
76 group => www-data 76 group => www-data
77 } 77 }
78 78
79 file {['/opt/discourse/tmp', '/opt/discourse/tmp/pids']: 79 file {['/opt/discourse/tmp', '/opt/discourse/tmp/pids']:
80 ensure => directory, 80 ensure => directory,
81 mode => 755, 81 mode => '755',
82 owner => discourse, 82 owner => discourse,
83 group => www-data, 83 group => www-data,
84 require => Exec['fetch-discourse'] 84 require => Exec['fetch-discourse']
85 } 85 }
86 86
87 file {'/opt/discourse/config/discourse.conf': 87 file {'/opt/discourse/config/discourse.conf':
88 mode => 600, 88 mode => '600',
89 owner => discourse, 89 owner => discourse,
90 group => www-data, 90 group => www-data,
91 content => template('discourse/discourse.conf.erb'), 91 content => template('discourse/discourse.conf.erb'),
92 notify => Service['discourse'], 92 notify => Service['discourse'],
93 require => Exec['fetch-discourse'] 93 require => Exec['fetch-discourse']
94 } 94 }
95 95
96 file {'/usr/local/bin/init-discourse': 96 file {'/usr/local/bin/init-discourse':
97 mode => 0755, 97 mode => '0755',
98 owner => root, 98 owner => root,
99 group => root, 99 group => root,
100 source => 'puppet:///modules/discourse/init-discourse' 100 source => 'puppet:///modules/discourse/init-discourse'
101 } 101 }
102 102
103 user {'discourse': 103 user {'discourse':
104 ensure => present, 104 ensure => present,
105 comment => 'Discourse user', 105 comment => 'Discourse user',
106 home => '/home/discourse', 106 home => '/home/discourse',
107 gid => www-data, 107 gid => www-data,
108 password => '*', 108 password => '*',
109 managehome => true 109 managehome => true
110 } 110 }
111 111
112 file {'/etc/sudoers.d/discourse': 112 file {'/etc/sudoers.d/discourse':
113 ensure => present, 113 ensure => present,
114 owner => root, 114 owner => root,
115 group => root, 115 group => root,
116 mode => 0440, 116 mode => '0440',
117 source => 'puppet:///modules/discourse/sudoers', 117 source => 'puppet:///modules/discourse/sudoers',
118 require => User['discourse'] 118 require => User['discourse']
119 } 119 }
120 120
121 exec {'fetch-discourse': 121 exec {'fetch-discourse':
122 command => "hg clone https://hg.adblockplus.org/discourse /opt/discourse", 122 command => "hg clone https://hg.adblockplus.org/discourse /opt/discourse",
123 path => ["/usr/bin/", "/bin/"], 123 path => ["/usr/bin/", "/bin/"],
124 user => discourse, 124 user => discourse,
125 group => www-data, 125 group => www-data,
126 timeout => 0, 126 timeout => 0,
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 global_config => ' 347 global_config => '
348 upstream discourse { 348 upstream discourse {
349 server localhost:3000; 349 server localhost:3000;
350 }', 350 }',
351 is_default => $is_default, 351 is_default => $is_default,
352 certificate => $certificate, 352 certificate => $certificate,
353 private_key => $private_key, 353 private_key => $private_key,
354 log => 'access_log_intraforum' 354 log => 'access_log_intraforum'
355 } 355 }
356 } 356 }
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