Skip to content
Snippets Groups Projects
Commit 9894cf6b authored by Thomas Bellman's avatar Thomas Bellman
Browse files

Add class for managing the Apache log directory.

parent 12a8dea4
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ class apache ...@@ -14,6 +14,7 @@ class apache
{ {
$configfile = '/etc/httpd/conf/httpd.conf' $configfile = '/etc/httpd/conf/httpd.conf'
$configdir = '/etc/httpd/conf.d' $configdir = '/etc/httpd/conf.d'
$logdir = '/var/log/httpd'
} }
...@@ -70,3 +71,26 @@ class apache::service ...@@ -70,3 +71,26 @@ class apache::service
hasstatus => true, hasrestart => true; hasstatus => true, hasrestart => true;
} }
} }
/*
* Manage the Apache log directory.
* This is mostly intended for those that don't want the defaults.
* By default, it sets ownership and permissions to the same as the
* RedHat packages do.
* To save a little bit of execution time, this is not included by the
* apache::base class, so users need to include it themselves.
*/
class apache::logdir($owner='root', $group='root', $mode=0700)
{
include apache
file {
$apache::logdir:
ensure => directory,
owner => $owner, group => $group, mode => $mode,
require => Package['httpd'], before => Class[apache::service];
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment