OLD | NEW |
| (Empty) |
1 class adblockplusorg { | |
2 package {['nginx', 'php5-cgi', 'php5-mysql']: ensure => 'present'} | |
3 | |
4 Package['php5-cgi'] -> Package['php5-mysql'] | |
5 | |
6 file {'/etc/nginx/sites-enabled/default': | |
7 ensure => 'absent', | |
8 require => Package['nginx'] | |
9 } | |
10 | |
11 file {'/etc/nginx/sites-available/adblockplus.org': | |
12 mode => 644, | |
13 owner => root, | |
14 group => root, | |
15 source => 'puppet:///modules/adblockplusorg/adblockplus.org', | |
16 require => Package['nginx'] | |
17 } | |
18 | |
19 file {'/etc/nginx/sites-enabled/adblockplus.org': | |
20 ensure => 'link', | |
21 target => '/etc/nginx/sites-available/adblockplus.org' | |
22 } | |
23 | |
24 service {'nginx': | |
25 ensure => 'running', | |
26 enable => true, | |
27 hasrestart => true, | |
28 hasstatus => true, | |
29 subscribe => File['/etc/nginx/sites-available/adblockplus.org'] | |
30 } | |
31 | |
32 file {'/usr/local/bin/deploy-anwiki': | |
33 mode => 744, | |
34 owner => root, | |
35 group => root, | |
36 source => 'puppet:///modules/adblockplusorg/deploy-anwiki' | |
37 } | |
38 | |
39 file {['/var', '/var/www', '/var/www/adblockplus.org', | |
40 '/var/www/adblockplus.org/httpdocs']: | |
41 ensure => 'directory' | |
42 } | |
43 | |
44 file {'/var/www/adblockplus.org/httpdocs/index.php': | |
45 mode => 744, | |
46 owner => 'www-data', | |
47 group => 'www-data', | |
48 content => '' | |
49 } | |
50 | |
51 file {'/var/www/adblockplus.org/httpdocs/default-static': | |
52 ensure => 'link', | |
53 target => '/var/www/adblockplus.org/anwiki/default-static' | |
54 } | |
55 | |
56 file {'/var/www/adblockplus.org/httpdocs/_override-static': | |
57 ensure => 'link', | |
58 target => '/var/www/adblockplus.org/anwiki/_override-static' | |
59 } | |
60 | |
61 file {'/var/www/adblockplus.org/httpdocs/_addons-static': | |
62 ensure => 'link', | |
63 target => '/var/www/adblockplus.org/anwiki/_addons-static' | |
64 } | |
65 | |
66 exec {'/usr/local/bin/deploy-anwiki': | |
67 subscribe => File['/usr/local/bin/deploy-anwiki'], | |
68 before => [ | |
69 File['/var/www/adblockplus.org/phproot/_anwiki-override.inc.php'], | |
70 File['/var/www/adblockplus.org/anwiki/_override/drivers/sessionsdrivers/se
ssionsdriver_mysql/sessionsdriver_mysql.cfg.php'], | |
71 File['/var/www/adblockplus.org/anwiki/_override/drivers/usersdrivers/users
driver_mysql/usersdriver_mysql.cfg.php'], | |
72 File['/var/www/adblockplus.org/anwiki/_override/drivers/storagedrivers/sto
ragedriver_mysql/storagedriver_mysql.cfg.php'] | |
73 ], | |
74 refreshonly => true | |
75 } | |
76 | |
77 file {'/var/www/adblockplus.org/phproot/_anwiki-override.inc.php': | |
78 source => 'puppet:///modules/adblockplusorg/_anwiki-override.inc.php', | |
79 owner => 'www-data', | |
80 group => 'www-data' | |
81 } | |
82 | |
83 file {'/var/www/adblockplus.org/anwiki/_override/drivers/sessionsdrivers/sessi
onsdriver_mysql/sessionsdriver_mysql.cfg.php': | |
84 source => 'puppet:///modules/adblockplusorg/anwiki.cfg.php', | |
85 replace => 'no', | |
86 ensure => 'present', | |
87 owner => 'www-data', | |
88 group => 'www-data' | |
89 } | |
90 | |
91 file {'/var/www/adblockplus.org/anwiki/_override/drivers/usersdrivers/usersdri
ver_mysql/usersdriver_mysql.cfg.php': | |
92 source => 'puppet:///modules/adblockplusorg/anwiki.cfg.php', | |
93 replace => 'no', | |
94 ensure => 'present', | |
95 owner => 'www-data', | |
96 group => 'www-data' | |
97 } | |
98 | |
99 file {'/var/www/adblockplus.org/anwiki/_override/drivers/storagedrivers/storag
edriver_mysql/storagedriver_mysql.cfg.php': | |
100 source => 'puppet:///modules/adblockplusorg/anwiki.cfg.php', | |
101 replace => 'no', | |
102 ensure => 'present', | |
103 owner => 'www-data', | |
104 group => 'www-data' | |
105 } | |
106 | |
107 package {'php5-fpm': | |
108 ensure => absent, | |
109 require => Class['mysql::server'] | |
110 } | |
111 | |
112 class {'spawn-fcgi':} | |
113 | |
114 # No PHP_FCGI_MAX_REQUESTS=100 in that something :( | |
115 spawn-fcgi::php-pool {'global': | |
116 ensure => present, | |
117 socket => '/tmp/php-fastcgi.sock', | |
118 children => '3' | |
119 } | |
120 | |
121 class {'mysql::server': | |
122 config_hash => {'root_password' => 'vagrant'} | |
123 } | |
124 | |
125 mysql::db {'anwiki': | |
126 user => 'anwiki', | |
127 password => 'vagrant', | |
128 host => 'localhost', | |
129 grant => ['all'], | |
130 require => Class['mysql::config'] | |
131 } | |
132 } | |
OLD | NEW |