/[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 2199 - (show annotations) (download)
Sun Jan 8 20:24:58 2012 UTC (9 years, 6 months ago) by misc
File size: 1349 byte(s)
add defaults values for user created by puppet, to remove duplication
1 class planet {
2
3 user { "planet":
4 groups => apache,
5 comment => "Planet Mageia",
6 home => "/var/lib/planet",
7 }
8
9 $location = "/var/www/vhosts/planet.$domain"
10 $vhost = "planet.$domain"
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 { "$planet_location":
25 ensure => directory,
26 owner => planet,
27 group => apache,
28 }
29
30 file { "$planet_location/index.php":
31 owner => planet,
32 group => apache,
33 mode => 755,
34 content => template("planet/index.php")
35 }
36
37 package { ['php-iconv']: }
38
39 class files_backup inherits base {
40 file { "/var/lib/planet/backup":
41 ensure => directory,
42 }
43
44 local_script { "backup_planet-files.sh":
45 content => template("blog/backup_planet-files.sh")
46 }
47
48 cron { "Backup files (planet)":
49 user => root,
50 hour => '23',
51 minute => '42',
52 command => "/usr/local/bin/backup_planet-files.sh",
53 require => [File["backup_planet-files"]],
54 }
55 }
56 }

  ViewVC Help
Powered by ViewVC 1.1.28