summaryrefslogtreecommitdiff
path: root/manifests/centos.pp
blob: 44461144b90d76a83818479f7952e39813167ec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
### centos
class apache::centos inherits apache::package {
    $config_dir = '/etc/httpd'

    Package[apache]{
        name => 'httpd',
    }
    Service[apache]{
        name => 'httpd',
        restart => '/etc/init.d/httpd graceful',
    }
    File[vhosts_dir]{
        path => "$config_dir/vhosts.d",
    }
    File[config_dir]{
        path => "$config_dir/conf.d",
    }
    File[modules_dir]{
        path => "$config_dir/modules.d",
    }
    File[web_dir]{
        path => "/var/www/vhosts",
    }
    File[default_apache_index]{
        path => '/var/www/html/index.html',
    }

    file{'/etc/sysconfig/httpd':
      source => [ "puppet://$server/modules/site-apache/sysconfig/${fqdn}/httpd",
                  "puppet://$server/modules/site-apache/sysconfig/httpd",
                  "puppet://$server/modules/apache/sysconfig/${operatingsystem}/httpd",
                  "puppet://$server/modules/apache/sysconfig/httpd" ],
      require => Package['apache'],
      notify => Service['apache'],
      owner => root, group => 0, mode => 0644;
    }

    include apache::logrotate::centos

    apache::config::global{ 'welcome.conf': }
    apache::config::global{ 'vhosts.conf': }
}