1 |
dams |
911 |
class planet { |
2 |
dams |
1093 |
|
3 |
misc |
2713 |
user { 'planet': |
4 |
|
|
groups => 'apache', |
5 |
|
|
comment => 'Planet Mageia', |
6 |
|
|
home => '/var/lib/planet', |
7 |
dams |
993 |
} |
8 |
dams |
1000 |
|
9 |
misc |
2713 |
$vhost = "planet.$::domain" |
10 |
|
|
$location = "/var/www/vhosts/$vhost" |
11 |
dams |
1093 |
|
12 |
misc |
2685 |
include apache::mod::php |
13 |
misc |
2682 |
include apache::mod::deflate |
14 |
misc |
2193 |
|
15 |
misc |
2713 |
apache::vhost::base { $vhost: |
16 |
misc |
2193 |
location => $location, |
17 |
misc |
2713 |
content => template('planet/planet_vhosts.conf') |
18 |
dams |
909 |
} |
19 |
|
|
|
20 |
boklm |
3300 |
apache::vhost::base { "ssl_$vhost": |
21 |
|
|
use_ssl => true, |
22 |
|
|
vhost => $vhost, |
23 |
|
|
location => $location, |
24 |
|
|
content => template('planet/planet_vhosts.conf') |
25 |
|
|
} |
26 |
|
|
|
27 |
boklm |
3254 |
mga_common::local_script { 'deploy_new-planet.sh': |
28 |
misc |
2713 |
content => template('planet/deploy_new-planet.sh') |
29 |
dams |
1108 |
} |
30 |
|
|
|
31 |
misc |
2713 |
file { $location: |
32 |
misc |
2193 |
ensure => directory, |
33 |
dams |
909 |
} |
34 |
dams |
1018 |
|
35 |
misc |
2250 |
file { "$location/index.php": |
36 |
misc |
2713 |
content => template('planet/index.php') |
37 |
dams |
1131 |
} |
38 |
|
|
|
39 |
misc |
2193 |
package { ['php-iconv']: } |
40 |
dams |
1431 |
|
41 |
|
|
class files_backup inherits base { |
42 |
|
|
file { "/var/lib/planet/backup": |
43 |
|
|
ensure => directory, |
44 |
|
|
} |
45 |
|
|
|
46 |
boklm |
3254 |
mga_common::local_script { "backup_planet-files.sh": |
47 |
dams |
1431 |
content => template("blog/backup_planet-files.sh") |
48 |
|
|
} |
49 |
|
|
|
50 |
|
|
cron { "Backup files (planet)": |
51 |
|
|
user => root, |
52 |
|
|
hour => '23', |
53 |
|
|
minute => '42', |
54 |
|
|
command => "/usr/local/bin/backup_planet-files.sh", |
55 |
|
|
require => [File["backup_planet-files"]], |
56 |
|
|
} |
57 |
dams |
1018 |
} |
58 |
dams |
909 |
} |