summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Nikitin <anikitin@mirantis.com>2016-03-21 12:26:53 +0300
committerAndrey Nikitin <anikitin@mirantis.com>2016-03-21 12:44:49 +0300
commit080f4bab6a04f16e7e03b545831a0ff9a9eec985 (patch)
tree9fd9c46d51da90450754a79b06d1a55251b38d91
parentaec75a659fe8f22e364c102e50485c8d320b72cf (diff)
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
Notes
Notes (review): Code-Review+2: yolanda.robla <yolanda.robla-mota@hpe.com> Code-Review+1: Ricardo Carrillo Cruz <ricardo.carrillo.cruz@gmail.com> Code-Review+2: Paul Belanger <pabelanger@redhat.com> Workflow+1: Paul Belanger <pabelanger@redhat.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 22 Mar 2016 15:49:05 +0000 Reviewed-on: https://review.openstack.org/295157 Project: openstack-infra/puppet-httpd Branch: refs/heads/master
-rw-r--r--manifests/logrotate.pp10
-rw-r--r--manifests/params.pp14
-rw-r--r--manifests/vhost.pp18
-rw-r--r--manifests/vhost/proxy.pp16
4 files changed, 29 insertions, 29 deletions
diff --git a/manifests/logrotate.pp b/manifests/logrotate.pp
index 7418782..d4356e4 100644
--- a/manifests/logrotate.pp
+++ b/manifests/logrotate.pp
@@ -1,7 +1,9 @@
1# == Class: httpd::logrotate 1# == Class: httpd::logrotate
2# 2#
3class httpd::logrotate ( 3class httpd::logrotate (
4 $options = [ 4 $firstaction = 'undef',
5 $lastaction = 'undef',
6 $options = [
5 'daily', 7 'daily',
6 'missingok', 8 'missingok',
7 'rotate 30', 9 'rotate 30',
@@ -10,16 +12,14 @@ class httpd::logrotate (
10 'notifempty', 12 'notifempty',
11 'create 640 root adm', 13 'create 640 root adm',
12 ], 14 ],
13 $prerotate = [ 15 $prerotate = [
14 "if [ -d /etc/logrotate.d/${::httpd::params::apache_name}-prerotate ]; then \\", 16 "if [ -d /etc/logrotate.d/${::httpd::params::apache_name}-prerotate ]; then \\",
15 " run-parts /etc/logrotate.d/${::httpd::params::apache_name}-prerotate; fi ; \\", 17 " run-parts /etc/logrotate.d/${::httpd::params::apache_name}-prerotate; fi ; \\",
16 ], 18 ],
17 $postrotate = [ 19 $postrotate = [
18 "if service ${::httpd::params::apache_name} status > /dev/null; then \\", 20 "if service ${::httpd::params::apache_name} status > /dev/null; then \\",
19 " service ${::httpd::params::apache_name} reload > /dev/null; fi; \\", 21 " service ${::httpd::params::apache_name} reload > /dev/null; fi; \\",
20 ], 22 ],
21 $firstaction = 'undef',
22 $lastaction = 'undef',
23) inherits httpd::params { 23) inherits httpd::params {
24 include ::logrotate 24 include ::logrotate
25 25
diff --git a/manifests/params.pp b/manifests/params.pp
index 66b99f7..5297046 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -19,16 +19,16 @@
19# 19#
20class httpd::params { 20class httpd::params {
21 21
22 $user = 'www-data' 22 $auth = false
23 $group = 'www-data' 23 $group = 'www-data'
24 $ssl = true 24 $options = 'Indexes FollowSymLinks MultiViews'
25 $template = 'httpd/vhost-default.conf.erb'
26 $priority = '25' 25 $priority = '25'
27 $servername = undef
28 $serveraliases = undef
29 $auth = false
30 $redirect_ssl = false 26 $redirect_ssl = false
31 $options = 'Indexes FollowSymLinks MultiViews' 27 $serveraliases = undef
28 $servername = undef
29 $ssl = true
30 $template = 'httpd/vhost-default.conf.erb'
31 $user = 'www-data'
32 $vhost_name = '*' 32 $vhost_name = '*'
33 33
34 case $::operatingsystem { 34 case $::operatingsystem {
diff --git a/manifests/vhost.pp b/manifests/vhost.pp
index 5c9ded6..86e4870 100644
--- a/manifests/vhost.pp
+++ b/manifests/vhost.pp
@@ -29,19 +29,19 @@
29# } 29# }
30# 30#
31define httpd::vhost( 31define httpd::vhost(
32 $port,
33 $docroot, 32 $docroot,
33 $port,
34 $apache_name = $httpd::params::apache_name,
35 $auth = $httpd::params::auth,
34 $configure_firewall = true, 36 $configure_firewall = true,
35 $ssl = $httpd::params::ssl, 37 $options = $httpd::params::options,
36 $template = $httpd::params::template,
37 $priority = $httpd::params::priority, 38 $priority = $httpd::params::priority,
38 $servername = $httpd::params::servername,
39 $serveraliases = $httpd::params::serveraliases,
40 $auth = $httpd::params::auth,
41 $redirect_ssl = $httpd::params::redirect_ssl, 39 $redirect_ssl = $httpd::params::redirect_ssl,
42 $options = $httpd::params::options, 40 $serveraliases = $httpd::params::serveraliases,
43 $apache_name = $httpd::params::apache_name, 41 $servername = $httpd::params::servername,
44 $vhost_name = $httpd::params::vhost_name 42 $ssl = $httpd::params::ssl,
43 $template = $httpd::params::template,
44 $vhost_name = $httpd::params::vhost_name,
45 ) { 45 ) {
46 46
47 include ::httpd 47 include ::httpd
diff --git a/manifests/vhost/proxy.pp b/manifests/vhost/proxy.pp
index 54e814c..a79c927 100644
--- a/manifests/vhost/proxy.pp
+++ b/manifests/vhost/proxy.pp
@@ -19,16 +19,16 @@
19# Sample Usage: 19# Sample Usage:
20# 20#
21define httpd::vhost::proxy ( 21define httpd::vhost::proxy (
22 $port,
23 $dest, 22 $dest,
24 $priority = '10', 23 $port,
25 $template = 'httpd/vhost-proxy.conf.erb', 24 $docroot = undef,
26 $servername = undef, 25 $priority = '10',
27 $serveraliases = undef,
28 $ssl = false,
29 $vhost_name = '*',
30 $proxyexclusions = undef, 26 $proxyexclusions = undef,
31 $docroot = undef, 27 $serveraliases = undef,
28 $servername = undef,
29 $ssl = false,
30 $template = 'httpd/vhost-proxy.conf.erb',
31 $vhost_name = '*',
32 ) { 32 ) {
33 33
34 include ::httpd 34 include ::httpd