OLD | NEW |
1 class web::server( | 1 class web::server( |
2 $vhost, | 2 $vhost, |
3 $repository, | 3 $repository, |
4 $certificate = hiera('web::server::certificate', 'undef'), | 4 $certificate = hiera('web::server::certificate', 'undef'), |
5 $private_key = hiera('web::server::private_key', 'undef'), | 5 $private_key = hiera('web::server::private_key', 'undef'), |
6 $is_default = false, | 6 $is_default = false, |
7 $aliases = undef, | 7 $aliases = undef, |
8 $custom_config = undef, | 8 $custom_config = undef, |
9 $multiplexer_locations = undef, | 9 $multiplexer_locations = undef, |
10 $geoip = false, | 10 $geoip = false, |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 comment => 'Web content owner', | 95 comment => 'Web content owner', |
96 home => '/home/www', | 96 home => '/home/www', |
97 managehome => true, | 97 managehome => true, |
98 } | 98 } |
99 | 99 |
100 exec {"fetch_cms": | 100 exec {"fetch_cms": |
101 command => "hg clone https://hg.adblockplus.org/cms/ /opt/cms", | 101 command => "hg clone https://hg.adblockplus.org/cms/ /opt/cms", |
102 path => ["/usr/bin/", "/bin/"], | 102 path => ["/usr/bin/", "/bin/"], |
103 require => Package['mercurial'], | 103 require => Package['mercurial'], |
104 timeout => 0, | 104 timeout => 0, |
105 onlyif => "test ! -d /opt/cms", | 105 creates => "/opt/cms/.hg/hgrc", |
106 } | 106 } |
107 | 107 |
108 exec {"fetch_repo": | 108 exec {"fetch_repo": |
109 command => "hg clone -U https://hg.adblockplus.org/${repository} /home/www/$
{repository}", | 109 command => "hg clone -U https://hg.adblockplus.org/${repository} /home/www/$
{repository}", |
110 path => ["/usr/bin/", "/bin/"], | 110 path => ["/usr/bin/", "/bin/"], |
111 require => Package['mercurial'], | 111 require => Package['mercurial'], |
112 user => www, | 112 user => www, |
113 timeout => 0, | 113 timeout => 0, |
114 onlyif => "test ! -d /home/www/${repository}", | 114 creates => "/home/www/${repository}/.hg/hgrc", |
115 } | 115 } |
116 | 116 |
117 file {'/var/www': | 117 file {'/var/www': |
118 ensure => directory, | 118 ensure => directory, |
119 mode => 755, | 119 mode => 755, |
120 } | 120 } |
121 | 121 |
122 file {[ | 122 file {[ |
123 "/var/cache/$repository", | 123 "/var/cache/$repository", |
124 "/var/www/$vhost", | 124 "/var/www/$vhost", |
(...skipping 11 matching lines...) Expand all Loading... |
136 } | 136 } |
137 | 137 |
138 cron {'update_repo': | 138 cron {'update_repo': |
139 ensure => present, | 139 ensure => present, |
140 command => "hg pull -q -R /home/www/${repository} && python -m cms.bin.gener
ate_static_pages /home/www/${repository} /var/www/${vhost}", | 140 command => "hg pull -q -R /home/www/${repository} && python -m cms.bin.gener
ate_static_pages /home/www/${repository} /var/www/${vhost}", |
141 user => www, | 141 user => www, |
142 minute => '5-59/20', | 142 minute => '5-59/20', |
143 } | 143 } |
144 | 144 |
145 } | 145 } |
OLD | NEW |