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:
		@@ -1,7 +1,9 @@
 | 
			
		||||
# == Class: httpd::logrotate
 | 
			
		||||
#
 | 
			
		||||
class httpd::logrotate (
 | 
			
		||||
  $options = [
 | 
			
		||||
  $firstaction = 'undef',
 | 
			
		||||
  $lastaction  = 'undef',
 | 
			
		||||
  $options     = [
 | 
			
		||||
      'daily',
 | 
			
		||||
      'missingok',
 | 
			
		||||
      'rotate 30',
 | 
			
		||||
@@ -10,16 +12,14 @@ class httpd::logrotate (
 | 
			
		||||
      'notifempty',
 | 
			
		||||
      'create 640 root adm',
 | 
			
		||||
  ],
 | 
			
		||||
  $prerotate = [
 | 
			
		||||
  $prerotate   = [
 | 
			
		||||
    "if [ -d /etc/logrotate.d/${::httpd::params::apache_name}-prerotate ]; then \\",
 | 
			
		||||
    "  run-parts /etc/logrotate.d/${::httpd::params::apache_name}-prerotate; fi ; \\",
 | 
			
		||||
  ],
 | 
			
		||||
  $postrotate = [
 | 
			
		||||
  $postrotate  = [
 | 
			
		||||
    "if service ${::httpd::params::apache_name} status > /dev/null; then \\",
 | 
			
		||||
    "  service ${::httpd::params::apache_name} reload > /dev/null; fi; \\",
 | 
			
		||||
  ],
 | 
			
		||||
  $firstaction = 'undef',
 | 
			
		||||
  $lastaction = 'undef',
 | 
			
		||||
) inherits httpd::params {
 | 
			
		||||
  include ::logrotate
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,16 +19,16 @@
 | 
			
		||||
#
 | 
			
		||||
class httpd::params {
 | 
			
		||||
 | 
			
		||||
  $user          = 'www-data'
 | 
			
		||||
  $auth          = false
 | 
			
		||||
  $group         = 'www-data'
 | 
			
		||||
  $options       = 'Indexes FollowSymLinks MultiViews'
 | 
			
		||||
  $priority      = '25'
 | 
			
		||||
  $redirect_ssl  = false
 | 
			
		||||
  $serveraliases = undef
 | 
			
		||||
  $servername    = undef
 | 
			
		||||
  $ssl           = true
 | 
			
		||||
  $template      = 'httpd/vhost-default.conf.erb'
 | 
			
		||||
  $priority      = '25'
 | 
			
		||||
  $servername    = undef
 | 
			
		||||
  $serveraliases = undef
 | 
			
		||||
  $auth          = false
 | 
			
		||||
  $redirect_ssl  = false
 | 
			
		||||
  $options       = 'Indexes FollowSymLinks MultiViews'
 | 
			
		||||
  $user          = 'www-data'
 | 
			
		||||
  $vhost_name    = '*'
 | 
			
		||||
 | 
			
		||||
  case $::operatingsystem {
 | 
			
		||||
 
 | 
			
		||||
@@ -29,19 +29,19 @@
 | 
			
		||||
#  }
 | 
			
		||||
#
 | 
			
		||||
define httpd::vhost(
 | 
			
		||||
    $port,
 | 
			
		||||
    $docroot,
 | 
			
		||||
    $port,
 | 
			
		||||
    $apache_name        = $httpd::params::apache_name,
 | 
			
		||||
    $auth               = $httpd::params::auth,
 | 
			
		||||
    $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,
 | 
			
		||||
    $template           = $httpd::params::template,
 | 
			
		||||
    $priority           = $httpd::params::priority,
 | 
			
		||||
    $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
 | 
			
		||||
    $vhost_name         = $httpd::params::vhost_name,
 | 
			
		||||
  ) {
 | 
			
		||||
 | 
			
		||||
  include ::httpd
 | 
			
		||||
 
 | 
			
		||||
@@ -19,16 +19,16 @@
 | 
			
		||||
# Sample Usage:
 | 
			
		||||
#
 | 
			
		||||
define httpd::vhost::proxy (
 | 
			
		||||
    $port,
 | 
			
		||||
    $dest,
 | 
			
		||||
    $priority      = '10',
 | 
			
		||||
    $template      = 'httpd/vhost-proxy.conf.erb',
 | 
			
		||||
    $servername    = undef,
 | 
			
		||||
    $serveraliases = undef,
 | 
			
		||||
    $ssl           = false,
 | 
			
		||||
    $vhost_name    = '*',
 | 
			
		||||
    $port,
 | 
			
		||||
    $docroot         = undef,
 | 
			
		||||
    $priority        = '10',
 | 
			
		||||
    $proxyexclusions = undef,
 | 
			
		||||
    $docroot       = undef,
 | 
			
		||||
    $serveraliases   = undef,
 | 
			
		||||
    $servername      = undef,
 | 
			
		||||
    $ssl             = false,
 | 
			
		||||
    $template        = 'httpd/vhost-proxy.conf.erb',
 | 
			
		||||
    $vhost_name      = '*',
 | 
			
		||||
  ) {
 | 
			
		||||
 | 
			
		||||
  include ::httpd
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user