Order of the classes parameters is refactored

Order and intendation of those parameters are changed
to follow Puppet Style Guide recommendation [0].
Moreover, it will allow to an user to find much faster
a variable in a list of variables.

[0]. https://docs.puppetlabs.com/guides/style_guide.html

Change-Id: If2443cbc57671784cfcb31bbe0ada0c09f78c996
This commit is contained in:
Andrey Nikitin 2016-03-21 12:26:53 +03:00
parent aec75a659f
commit 080f4bab6a
4 changed files with 29 additions and 29 deletions

View File

@ -1,7 +1,9 @@
# == Class: httpd::logrotate # == Class: httpd::logrotate
# #
class httpd::logrotate ( class httpd::logrotate (
$options = [ $firstaction = 'undef',
$lastaction = 'undef',
$options = [
'daily', 'daily',
'missingok', 'missingok',
'rotate 30', 'rotate 30',
@ -10,16 +12,14 @@ class httpd::logrotate (
'notifempty', 'notifempty',
'create 640 root adm', 'create 640 root adm',
], ],
$prerotate = [ $prerotate = [
"if [ -d /etc/logrotate.d/${::httpd::params::apache_name}-prerotate ]; then \\", "if [ -d /etc/logrotate.d/${::httpd::params::apache_name}-prerotate ]; then \\",
" run-parts /etc/logrotate.d/${::httpd::params::apache_name}-prerotate; fi ; \\", " run-parts /etc/logrotate.d/${::httpd::params::apache_name}-prerotate; fi ; \\",
], ],
$postrotate = [ $postrotate = [
"if service ${::httpd::params::apache_name} status > /dev/null; then \\", "if service ${::httpd::params::apache_name} status > /dev/null; then \\",
" service ${::httpd::params::apache_name} reload > /dev/null; fi; \\", " service ${::httpd::params::apache_name} reload > /dev/null; fi; \\",
], ],
$firstaction = 'undef',
$lastaction = 'undef',
) inherits httpd::params { ) inherits httpd::params {
include ::logrotate include ::logrotate

View File

@ -19,16 +19,16 @@
# #
class httpd::params { class httpd::params {
$user = 'www-data' $auth = false
$group = 'www-data' $group = 'www-data'
$options = 'Indexes FollowSymLinks MultiViews'
$priority = '25'
$redirect_ssl = false
$serveraliases = undef
$servername = undef
$ssl = true $ssl = true
$template = 'httpd/vhost-default.conf.erb' $template = 'httpd/vhost-default.conf.erb'
$priority = '25' $user = 'www-data'
$servername = undef
$serveraliases = undef
$auth = false
$redirect_ssl = false
$options = 'Indexes FollowSymLinks MultiViews'
$vhost_name = '*' $vhost_name = '*'
case $::operatingsystem { case $::operatingsystem {

View File

@ -29,19 +29,19 @@
# } # }
# #
define httpd::vhost( define httpd::vhost(
$port,
$docroot, $docroot,
$port,
$apache_name = $httpd::params::apache_name,
$auth = $httpd::params::auth,
$configure_firewall = true, $configure_firewall = true,
$options = $httpd::params::options,
$priority = $httpd::params::priority,
$redirect_ssl = $httpd::params::redirect_ssl,
$serveraliases = $httpd::params::serveraliases,
$servername = $httpd::params::servername,
$ssl = $httpd::params::ssl, $ssl = $httpd::params::ssl,
$template = $httpd::params::template, $template = $httpd::params::template,
$priority = $httpd::params::priority, $vhost_name = $httpd::params::vhost_name,
$servername = $httpd::params::servername,
$serveraliases = $httpd::params::serveraliases,
$auth = $httpd::params::auth,
$redirect_ssl = $httpd::params::redirect_ssl,
$options = $httpd::params::options,
$apache_name = $httpd::params::apache_name,
$vhost_name = $httpd::params::vhost_name
) { ) {
include ::httpd include ::httpd

View File

@ -19,16 +19,16 @@
# Sample Usage: # Sample Usage:
# #
define httpd::vhost::proxy ( define httpd::vhost::proxy (
$port,
$dest, $dest,
$priority = '10', $port,
$template = 'httpd/vhost-proxy.conf.erb', $docroot = undef,
$servername = undef, $priority = '10',
$serveraliases = undef,
$ssl = false,
$vhost_name = '*',
$proxyexclusions = undef, $proxyexclusions = undef,
$docroot = undef, $serveraliases = undef,
$servername = undef,
$ssl = false,
$template = 'httpd/vhost-proxy.conf.erb',
$vhost_name = '*',
) { ) {
include ::httpd include ::httpd