apache: Initial CentOS/RedHat 7 support.
This commit is contained in:
parent
21a8b36b10
commit
444ac2363c
6 changed files with 757 additions and 16 deletions
|
@ -1,5 +1,11 @@
|
|||
class apache::redhat::server {
|
||||
|
||||
if versioncmp($::operatingsystemrelease, 7) < 0 {
|
||||
$config = "apache/httpd.conf.el6.erb"
|
||||
} else {
|
||||
$config = "apache/httpd.conf.el7.erb"
|
||||
}
|
||||
|
||||
file { [ "/etc/httpd/conf.http.d",
|
||||
"/etc/httpd/site.http.d",
|
||||
"/srv/www/http",
|
||||
|
@ -27,7 +33,7 @@ class apache::redhat::server {
|
|||
|
||||
file { "/etc/httpd/conf/httpd.conf":
|
||||
ensure => present,
|
||||
content => template("apache/httpd.conf.erb"),
|
||||
content => template($config),
|
||||
mode => "0644",
|
||||
owner => root,
|
||||
group => root,
|
||||
|
@ -124,6 +130,12 @@ define apache::redhat::site($aliases, $root, $redirect, $proxy) {
|
|||
|
||||
class apache::redhat::sslserver {
|
||||
|
||||
if versioncmp($::operatingsystemrelease, 7) < 0 {
|
||||
$config = "apache/httpsd.conf.el6.erb"
|
||||
} else {
|
||||
$config = "apache/httpsd.conf.el7.erb"
|
||||
}
|
||||
|
||||
package { "mod_ssl":
|
||||
ensure => installed
|
||||
}
|
||||
|
@ -158,7 +170,7 @@ class apache::redhat::sslserver {
|
|||
mode => "0644",
|
||||
owner => root,
|
||||
group => root,
|
||||
content => template("apache/httpsd.conf.erb"),
|
||||
content => template($config),
|
||||
require => Package["httpd"],
|
||||
notify => Service["httpsd"],
|
||||
}
|
||||
|
@ -175,19 +187,30 @@ class apache::redhat::sslserver {
|
|||
}
|
||||
}
|
||||
default: {
|
||||
file { "/etc/init.d/httpsd":
|
||||
ensure => present,
|
||||
source => "puppet:///modules/apache/httpsd",
|
||||
mode => "0755",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
notify => Exec["chkconfig --add httpsd"],
|
||||
}
|
||||
exec { "chkconfig --add httpsd":
|
||||
user => "root",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
refreshonly => true,
|
||||
before => Service["httpsd"],
|
||||
if versioncmp($::operatingsystemrelease, 7) < 0 {
|
||||
file { "/etc/init.d/httpsd":
|
||||
ensure => present,
|
||||
source => "puppet:///modules/apache/httpsd",
|
||||
mode => "0755",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
notify => Exec["chkconfig --add httpsd"],
|
||||
}
|
||||
exec { "chkconfig --add httpsd":
|
||||
user => "root",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
refreshonly => true,
|
||||
before => Service["httpsd"],
|
||||
}
|
||||
} else {
|
||||
file { "/lib/systemd/system/httpsd.service":
|
||||
ensure => present,
|
||||
source => "puppet:///modules/apache/httpsd.service",
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
before => Service["httpsd"],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue