Commit af768b58 authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

create su_apache::package class

parent ae250fbc
......@@ -10,26 +10,9 @@ class su_apache (
include webauth
}
if ($::osfamily == 'RedHat') {
package { 'apache':
ensure => present,
name => 'httpd',
}
} elsif ($::osfamily == 'Debian') {
if (($::lsbdistcodename == 'wheezy') or ($::lsbdistcodename == 'jessie')) {
package { 'apache':
ensure => present,
name => 'apache2-mpm-prefork',
}
} else {
package { 'apache':
ensure => present,
name => 'apache2',
}
}
} else {
crit('do not know what to do')
}
# Install the Apache package; defines the "apache" package
# resource used in su_apache::module, su_apache::conf, et al.
include su_apache::package
# Name the service apache, which doesn't match the name from either OS but
# is easier to remember.
......
......@@ -15,6 +15,8 @@ define su_apache::module(
fail("Unsupported su_apache::module operating system ${::operatingsystem}")
}
include su_apache::package
# Set various local variables to keep the exec readable.
$modsdir = '/etc/apache2/mods-enabled'
$module = "${modsdir}/${name}"
......
# Load the package and set the "apache" package resource.
class su_apache::package {
if ($::osfamily == 'RedHat') {
package { 'apache':
ensure => present,
name => 'httpd',
}
} elsif ($::osfamily == 'Debian') {
if (($::lsbdistcodename == 'wheezy') or ($::lsbdistcodename == 'jessie')) {
package { 'apache':
ensure => present,
name => 'apache2-mpm-prefork',
}
} else {
package { 'apache':
ensure => present,
name => 'apache2',
}
}
} else {
crit('do not know what to do')
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment