LEFT | RIGHT |
1 class discourse( | 1 class discourse( |
2 $domain, | 2 $domain, |
3 $certificate, | 3 $certificate, |
4 $private_key, | 4 $private_key, |
5 $site_settings, | 5 $site_settings, |
6 $is_default = false, | 6 $is_default = false, |
7 $admins = hiera('discourse::admins', []) | 7 $admins = hiera('discourse::admins', []) |
8 ) { | 8 ) { |
9 | 9 |
10 apt::source {'docker': | 10 apt::source {'docker': |
(...skipping 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 | 32 |
33 file {'/var/discourse': | 33 file {'/var/discourse': |
34 ensure => directory, | 34 ensure => directory, |
35 mode => 755, | 35 mode => 755, |
36 owner => root, | 36 owner => root, |
37 group => root | 37 group => root |
38 } | 38 } |
39 | 39 |
40 exec {'fetch-discourse-docker': | 40 exec {'fetch-discourse-docker': |
41 command => "hg clone https://hg.adblockplus.org/discourse_docker /var/discou
rse", | 41 command => "git clone https://github.com/discourse/discourse_docker.git /var
/discourse", |
42 path => ["/usr/bin/", "/bin/"], | 42 path => ["/usr/bin/", "/bin/"], |
43 user => root, | 43 user => root, |
44 timeout => 0, | 44 timeout => 0, |
45 require => [Package['mercurial'], File['/var/discourse']], | 45 require => [Package['git'], File['/var/discourse']], |
46 onlyif => "test ! -d /var/discourse/.hg" | 46 unless => "test -d /var/discourse/.git" |
47 } | 47 } |
48 | 48 |
49 file {'/var/discourse/containers/app.yml': | 49 file {'/var/discourse/containers/app.yml': |
50 ensure => file, | 50 ensure => file, |
51 mode => 600, | 51 mode => 600, |
52 owner => root, | 52 owner => root, |
53 group => root, | 53 group => root, |
54 content => template('discourse/app.yml.erb'), | 54 content => template('discourse/app.yml.erb'), |
55 require => Exec['fetch-discourse-docker'], | 55 require => Exec['fetch-discourse-docker'], |
56 } | 56 } |
(...skipping 22 matching lines...) Expand all Loading... |
79 } | 79 } |
80 | 80 |
81 nginx::hostconfig {$domain: | 81 nginx::hostconfig {$domain: |
82 source => 'puppet:///modules/discourse/site.conf', | 82 source => 'puppet:///modules/discourse/site.conf', |
83 is_default => $is_default, | 83 is_default => $is_default, |
84 certificate => $certificate, | 84 certificate => $certificate, |
85 private_key => $private_key, | 85 private_key => $private_key, |
86 log => 'access_log_intraforum' | 86 log => 'access_log_intraforum' |
87 } | 87 } |
88 } | 88 } |
LEFT | RIGHT |