Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
suitpuppet
su_apache
Commits
af768b58
Commit
af768b58
authored
Nov 12, 2020
by
Adam Lewenberg
Browse files
create su_apache::package class
parent
ae250fbc
Changes
3
Hide whitespace changes
Inline
Side-by-side
manifests/init.pp
View file @
af768b58
...
...
@@ -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.
...
...
manifests/module.pp
View file @
af768b58
...
...
@@ -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}
"
...
...
manifests/package.pp
0 → 100644
View file @
af768b58
# 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'
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment