aboutsummaryrefslogtreecommitdiffstats
path: root/modules/apache
diff options
context:
space:
mode:
authorThomas Backlund <tmb@mageia.org>2015-10-19 21:31:26 +0300
committerThomas Backlund <tmb@mageia.org>2015-10-19 21:31:26 +0300
commite9d95e0776dd39ed8881c40413240d55ca1b5786 (patch)
treee142fca6e879ddc56f737dd4a56849f523a6ab44 /modules/apache
parentbd3ba78ce61e869e68d2815a0c2b3651efed60ce (diff)
downloadpuppet-e9d95e0776dd39ed8881c40413240d55ca1b5786.tar
puppet-e9d95e0776dd39ed8881c40413240d55ca1b5786.tar.gz
puppet-e9d95e0776dd39ed8881c40413240d55ca1b5786.tar.bz2
puppet-e9d95e0776dd39ed8881c40413240d55ca1b5786.tar.xz
puppet-e9d95e0776dd39ed8881c40413240d55ca1b5786.zip
lint fixes for apache
Diffstat (limited to 'modules/apache')
-rw-r--r--modules/apache/manifests/base.pp10
-rw-r--r--modules/apache/manifests/cve-2011-3192.pp4
-rw-r--r--modules/apache/manifests/init.pp12
-rw-r--r--modules/apache/manifests/vhost/base.pp11
-rw-r--r--modules/apache/manifests/vhost/catalyst_app.pp4
-rw-r--r--modules/apache/manifests/vhost/django_app.pp4
-rw-r--r--modules/apache/manifests/vhost/other_app.pp2
-rw-r--r--modules/apache/manifests/vhost/redirect_ssl.pp2
-rw-r--r--modules/apache/manifests/webapp_other.pp2
9 files changed, 25 insertions, 26 deletions
diff --git a/modules/apache/manifests/base.pp b/modules/apache/manifests/base.pp
index f72e4aca..18c9a8bf 100644
--- a/modules/apache/manifests/base.pp
+++ b/modules/apache/manifests/base.pp
@@ -3,19 +3,19 @@ class apache::base {
# apache-mpm-prefork is merged from mga3 up
$apache_server = $lsbdistrelease ? {
- /1|2/ => 'apache-mpm-prefork',
- default => 'apache',
+ /1|2/ => 'apache-mpm-prefork',
+ default => 'apache',
}
package { $apache_server:
- alias => 'apache-server',
+ alias => 'apache-server',
}
# only needed on mga1 and mga2
if ($::lsbdistrelease == '1') or ($::lsbdistrelease == '2') {
- package { $apache::var::pkg_conf: }
+ package { $apache::var::pkg_conf: }
}
-
+
service { 'httpd':
alias => 'apache',
subscribe => [ Package['apache-server'] ],
diff --git a/modules/apache/manifests/cve-2011-3192.pp b/modules/apache/manifests/cve-2011-3192.pp
index 20b53216..c0f1c651 100644
--- a/modules/apache/manifests/cve-2011-3192.pp
+++ b/modules/apache/manifests/cve-2011-3192.pp
@@ -2,7 +2,7 @@ class apache::cve-2011-3192 {
# temporary protection against CVE-2011-3192
# http://httpd.apache.org/security/CVE-2011-3192.txt
apache::config {
- '/etc/httpd/conf.d/CVE-2011-3192.conf':
- content => template('apache/CVE-2011-3192.conf'),
+ '/etc/httpd/conf.d/CVE-2011-3192.conf':
+ content => template('apache/CVE-2011-3192.conf'),
}
}
diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp
index 5bfaa004..c9e0bcb6 100644
--- a/modules/apache/manifests/init.pp
+++ b/modules/apache/manifests/init.pp
@@ -3,18 +3,18 @@ class apache {
include apache::base
apache::vhost::base { $name:
location => $location,
- }
- }
+ }
+ }
define vhost_redirect($url,
- $vhost = false,
+ $vhost = false,
$use_ssl = false) {
include apache::base
apache::vhost::base { $name:
use_ssl => $use_ssl,
- vhost => $vhost,
+ vhost => $vhost,
content => template("apache/vhost_redirect.conf"),
- }
- }
+ }
+ }
}
diff --git a/modules/apache/manifests/vhost/base.pp b/modules/apache/manifests/vhost/base.pp
index a7e5720d..1ddc00cc 100644
--- a/modules/apache/manifests/vhost/base.pp
+++ b/modules/apache/manifests/vhost/base.pp
@@ -10,7 +10,7 @@ define apache::vhost::base ($content = '',
$enable_public_html = false) {
include apache::base
$httpd_logdir = '/var/log/httpd'
- $filename = "$name.conf"
+ $filename = "${name}.conf"
if ! $vhost {
$real_vhost = $name
@@ -19,12 +19,12 @@ define apache::vhost::base ($content = '',
}
if ! $access_logfile {
- $real_access_logfile = "$httpd_logdir/${real_vhost}-access_log"
+ $real_access_logfile = "${httpd_logdir}/${real_vhost}-access_log"
} else {
$real_access_logfile = $access_logfile
}
if ! $error_logfile {
- $real_error_logfile = "$httpd_logdir/${real_vhost}-error_log"
+ $real_error_logfile = "${httpd_logdir}/${real_vhost}-error_log"
} else {
$real_error_logfile = $error_logfile
}
@@ -34,7 +34,7 @@ define apache::vhost::base ($content = '',
if $wildcard_sslcert != true {
openssl::self_signed_cert{ $real_vhost:
directory => '/etc/ssl/apache/',
- before => Apache::Config["/etc/httpd/conf/vhosts.d/$filename"],
+ before => Apache::Config["/etc/httpd/conf/vhosts.d/${filename}"],
}
}
}
@@ -43,8 +43,7 @@ define apache::vhost::base ($content = '',
include apache::mod::public_html
}
- apache::config { "/etc/httpd/conf/vhosts.d/$filename":
+ apache::config { "/etc/httpd/conf/vhosts.d/${filename}":
content => template('apache/vhost_base.conf')
}
}
-
diff --git a/modules/apache/manifests/vhost/catalyst_app.pp b/modules/apache/manifests/vhost/catalyst_app.pp
index 4aec9a5e..11c77a8a 100644
--- a/modules/apache/manifests/vhost/catalyst_app.pp
+++ b/modules/apache/manifests/vhost/catalyst_app.pp
@@ -6,10 +6,10 @@ define apache::vhost::catalyst_app( $script,
$vhost = false) {
include apache::mod::fastcgi
if ($location) {
- $aliases['/static'] = "$location/root/static"
+ $aliases['/static'] = "${location}/root/static"
}
- $aliases['/'] = "$script/"
+ $aliases['/'] = "${script}/"
apache::vhost::base { $name:
vhost => $vhost,
diff --git a/modules/apache/manifests/vhost/django_app.pp b/modules/apache/manifests/vhost/django_app.pp
index 5613e384..91974acd 100644
--- a/modules/apache/manifests/vhost/django_app.pp
+++ b/modules/apache/manifests/vhost/django_app.pp
@@ -11,8 +11,8 @@ define apache::vhost::django_app ($module = false,
# module is a ruby reserved keyword, cannot be used in templates
$django_module = $module
- file { "$name.wsgi":
- path => "/usr/local/lib/wsgi/$name.wsgi",
+ file { "${name}.wsgi":
+ path => "/usr/local/lib/wsgi/${name}.wsgi",
mode => '0755',
notify => Service['apache'],
content => template('apache/django.wsgi'),
diff --git a/modules/apache/manifests/vhost/other_app.pp b/modules/apache/manifests/vhost/other_app.pp
index 69b3ec56..f5a71574 100644
--- a/modules/apache/manifests/vhost/other_app.pp
+++ b/modules/apache/manifests/vhost/other_app.pp
@@ -1,6 +1,6 @@
define apache::vhost::other_app($vhost_file) {
include apache::base
- apache::config { "/etc/httpd/conf/vhosts.d/$name.conf":
+ apache::config { "/etc/httpd/conf/vhosts.d/${name}.conf":
content => template($vhost_file),
}
}
diff --git a/modules/apache/manifests/vhost/redirect_ssl.pp b/modules/apache/manifests/vhost/redirect_ssl.pp
index 3458d59d..22a4d4f6 100644
--- a/modules/apache/manifests/vhost/redirect_ssl.pp
+++ b/modules/apache/manifests/vhost/redirect_ssl.pp
@@ -1,5 +1,5 @@
define apache::vhost::redirect_ssl() {
- apache::vhost::base { "redirect_ssl_$name":
+ apache::vhost::base { "redirect_ssl_${name}":
vhost => $name,
content => template('apache/vhost_ssl_redirect.conf')
}
diff --git a/modules/apache/manifests/webapp_other.pp b/modules/apache/manifests/webapp_other.pp
index 277558b5..147a2370 100644
--- a/modules/apache/manifests/webapp_other.pp
+++ b/modules/apache/manifests/webapp_other.pp
@@ -1,7 +1,7 @@
define apache::webapp_other($webapp_file) {
include apache::base
$webappname = $name
- apache::config { "/etc/httpd/conf/webapps.d/$webappname.conf":
+ apache::config { "/etc/httpd/conf/webapps.d/${webappname}.conf":
content => template($webapp_file),
}
}