/[adm]/puppet/modules/planet/manifests/init.pp
ViewVC logotype

Contents of /puppet/modules/planet/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2714 - (show annotations) (download)
Mon Apr 2 11:24:42 2012 UTC (9 years, 4 months ago) by misc
File size: 1214 byte(s)
no need to have the web directory owned by planet nor apache, nor to have index.php as +x
1 class planet {
2
3 user { 'planet':
4 groups => 'apache',
5 comment => 'Planet Mageia',
6 home => '/var/lib/planet',
7 }
8
9 $vhost = "planet.$::domain"
10 $location = "/var/www/vhosts/$vhost"
11
12 include apache::mod::php
13 include apache::mod::deflate
14
15 apache::vhost::base { $vhost:
16 location => $location,
17 content => template('planet/planet_vhosts.conf')
18 }
19
20 local_script { 'deploy_new-planet.sh':
21 content => template('planet/deploy_new-planet.sh')
22 }
23
24 file { $location:
25 ensure => directory,
26 }
27
28 file { "$location/index.php":
29 content => template('planet/index.php')
30 }
31
32 package { ['php-iconv']: }
33
34 class files_backup inherits base {
35 file { "/var/lib/planet/backup":
36 ensure => directory,
37 }
38
39 local_script { "backup_planet-files.sh":
40 content => template("blog/backup_planet-files.sh")
41 }
42
43 cron { "Backup files (planet)":
44 user => root,
45 hour => '23',
46 minute => '42',
47 command => "/usr/local/bin/backup_planet-files.sh",
48 require => [File["backup_planet-files"]],
49 }
50 }
51 }

  ViewVC Help
Powered by ViewVC 1.1.28