Fixing puppet-lint errors.

This commit is contained in:
Timo Mkinen 2012-03-27 14:41:39 +03:00
parent 2f83cb7d4a
commit 34c36045fa
59 changed files with 995 additions and 990 deletions

View file

@ -104,7 +104,7 @@ define apache::debian::site($aliases, $root, $redirect) {
file { "/srv/www/http/${site_fqdn}":
ensure => link,
target => $root,
before => File["${site_conf}"],
before => File[$site_conf],
}
} else {
file { "/srv/www/http/${site_fqdn}":
@ -112,7 +112,7 @@ define apache::debian::site($aliases, $root, $redirect) {
mode => 0755,
owner => root,
group => root,
before => File["${site_conf}"],
before => File[$site_conf],
}
}
@ -121,12 +121,12 @@ define apache::debian::site($aliases, $root, $redirect) {
mode => 0755,
owner => root,
group => root,
before => File["${site_conf}"],
before => File[$site_conf],
}
}
}
file { "${site_conf}":
file { $site_conf:
ensure => present,
mode => 0644,
owner => root,
@ -135,14 +135,14 @@ define apache::debian::site($aliases, $root, $redirect) {
}
if $redirect {
File["${site_conf}"] {
File[$site_conf] {
content => "<VirtualHost *:80>\n ServerName ${site_fqdn}\n Redirect permanent / ${redirect}\n</VirtualHost>\n",
}
} else {
File["${site_conf}"] {
File[$site_conf] {
content => template("apache/site.http.conf.erb"),
}
file { "${site_confdir}":
file { $site_confdir:
ensure => directory,
mode => 0644,
owner => root,
@ -152,7 +152,7 @@ define apache::debian::site($aliases, $root, $redirect) {
recurse => true,
source => [ "puppet:///files/apache/sites/${site_fqdn}",
"puppet:///modules/custom/empty", ],
before => File["${site_conf}"],
before => File[$site_conf],
notify => Service["apache2"],
}
}
@ -256,7 +256,7 @@ define apache::debian::sslsite($ipaddr, $root, $ssl_cert, $ssl_key, $ssl_chain)
$site_conf = "/etc/apache2/sites-enabled/${site_fqdn}-ssl.conf"
$site_confdir = "/etc/apache2/sites-enabled/${site_fqdn}-ssl.d"
file { "${site_conf}":
file { $site_conf:
ensure => present,
content => template("apache/site.https.conf.erb"),
mode => 0644,
@ -267,7 +267,7 @@ define apache::debian::sslsite($ipaddr, $root, $ssl_cert, $ssl_key, $ssl_chain)
File["/etc/ssl/private/${site_fqdn}.key"], ],
}
file { "${site_confdir}":
file { $site_confdir:
ensure => directory,
mode => 0644,
owner => root,
@ -277,7 +277,7 @@ define apache::debian::sslsite($ipaddr, $root, $ssl_cert, $ssl_key, $ssl_chain)
recurse => true,
source => [ "puppet:///files/apache/sslsites/${site_fqdn}",
"puppet:///modules/custom/empty", ],
before => File["${site_conf}"],
before => File[$site_conf],
notify => Service["apache2"],
}

View file

@ -21,7 +21,7 @@ class apache::common {
}
if $apache_datadir {
file { "${apache_datadir}":
file { $apache_datadir:
ensure => directory,
mode => 0755,
owner => "root",
@ -31,8 +31,8 @@ class apache::common {
file { "/srv/www":
ensure => link,
target => "${apache_datadir}",
require => File["${apache_datadir}"],
target => $apache_datadir,
require => File[$apache_datadir],
}
} else {
file { "/srv/www":
@ -55,7 +55,7 @@ class apache::common {
if $apache_datadir {
selinux::manage_fcontext { "${apache_datadir}(/.*)?":
type => "httpd_sys_content_t",
before => File["${apache_datadir}"],
before => File[$apache_datadir],
}
}
}
@ -70,11 +70,11 @@ class apache::common {
}
file { "/usr/local/sbin/www-logrotate.sh":
ensure => present,
source => "puppet:///modules/apache/www-logrotate.sh",
mode => 0755,
owner => root,
group => root,
ensure => present,
source => "puppet:///modules/apache/www-logrotate.sh",
mode => 0755,
owner => root,
group => root,
seluser => "system_u",
selrole => "object_r",
seltype => "httpd_rotatelogs_exec_t",
@ -155,14 +155,14 @@ define apache::site($aliases="", $root="", $redirect="") {
case $operatingsystem {
debian,ubuntu: {
apache::debian::site { "${name}":
apache::debian::site { $name:
aliases => $aliases,
root => $root,
redirect => $redirect,
}
}
centos,fedora: {
apache::redhat::site { "${name}":
apache::redhat::site { $name:
aliases => $aliases,
root => $root,
redirect => $redirect,
@ -175,8 +175,8 @@ define apache::site($aliases="", $root="", $redirect="") {
if !$redirect {
$site_fqdn = $name ? {
"default" => "${homename}",
default => "${name}",
"default" => $homename,
default => $name,
}
apache::webalizer::site { "http/${site_fqdn}":
site_proto => "http",
@ -268,7 +268,7 @@ define apache::sslsite($ipaddr="_default_", $root="", $ssl_cert="", $ssl_key="",
case $operatingsystem {
debian,ubuntu: {
$apache_ssldir = "/etc/ssl"
apache::debian::sslsite { "${name}":
apache::debian::sslsite { $name:
ipaddr => $ipaddr,
root => $root,
ssl_cert => $ssl_cert,
@ -279,7 +279,7 @@ define apache::sslsite($ipaddr="_default_", $root="", $ssl_cert="", $ssl_key="",
}
centos,fedora: {
$apache_ssldir = "/etc/pki/tls"
apache::redhat::sslsite { "${name}":
apache::redhat::sslsite { $name:
ipaddr => $ipaddr,
root => $root,
ssl_cert => $ssl_cert,
@ -294,8 +294,8 @@ define apache::sslsite($ipaddr="_default_", $root="", $ssl_cert="", $ssl_key="",
}
$site_fqdn = $name ? {
"default" => "${homename}",
default => "${name}",
"default" => $homename,
default => $name,
}
apache::webalizer::site { "https/${site_fqdn}":
site_proto => "https",
@ -335,17 +335,17 @@ define apache::configfile($source="", $content="", $http=true, $https=true) {
case $operatingsystem {
debian,ubuntu: {
apache::debian::configfile { "${name}":
source => "${source}",
content => "${content}",
apache::debian::configfile { $name:
source => $source,
content => $content,
http => $http,
https => $https,
}
}
centos,fedora: {
apache::redhat::configfile { "${name}":
source => "${source}",
content => "${content}",
apache::redhat::configfile { $name:
source => $source,
content => $content,
http => $http,
https => $https,
}
@ -418,7 +418,7 @@ class apache::mod::fcgid {
ubuntu => "libapache2-mod-fcgid",
default => "mod_fcgid",
},
ensure => installed,
ensure => installed,
require => Package["httpd"],
}
@ -485,7 +485,7 @@ class apache::mod::perl {
ubuntu => "libapache2-mod-perl2",
default => "mod_perl",
},
ensure => installed,
ensure => installed,
require => Package["httpd"],
}
@ -518,7 +518,7 @@ class apache::mod::php {
ubuntu => "libapache2-mod-php5",
default => "php",
},
ensure => installed,
ensure => installed,
require => Package["httpd"],
}
@ -608,7 +608,7 @@ class apache::mod::python {
ubuntu => "libapache2-mod-python",
default => "mod_python",
},
ensure => installed,
ensure => installed,
require => Package["httpd"],
}

View file

@ -57,7 +57,7 @@ define apache::redhat::site($aliases, $root, $redirect) {
file { "/srv/www/http/${site_fqdn}":
ensure => link,
target => $root,
before => File["${site_conf}"],
before => File[$site_conf],
}
} else {
file { "/srv/www/http/${site_fqdn}":
@ -65,7 +65,7 @@ define apache::redhat::site($aliases, $root, $redirect) {
mode => 0755,
owner => root,
group => root,
before => File["${site_conf}"],
before => File[$site_conf],
}
}
@ -74,12 +74,12 @@ define apache::redhat::site($aliases, $root, $redirect) {
mode => 0755,
owner => root,
group => root,
before => File["${site_conf}"],
before => File[$site_conf],
}
}
}
file { "${site_conf}":
file { $site_conf:
ensure => present,
mode => 0644,
owner => root,
@ -88,14 +88,14 @@ define apache::redhat::site($aliases, $root, $redirect) {
}
if $redirect {
File["${site_conf}"] {
File[$site_conf] {
content => "<VirtualHost *:80>\n ServerName ${site_fqdn}\n Redirect permanent / ${redirect}\n</VirtualHost>\n",
}
} else {
File["${site_conf}"] {
File[$site_conf] {
content => template("apache/site.http.conf.erb"),
}
file { "${site_confdir}":
file { $site_confdir:
ensure => directory,
mode => 0644,
owner => root,
@ -105,7 +105,7 @@ define apache::redhat::site($aliases, $root, $redirect) {
recurse => true,
source => [ "puppet:///files/apache/sites/${site_fqdn}",
"puppet:///modules/custom/empty", ],
before => File["${site_conf}"],
before => File[$site_conf],
notify => Service["httpd"],
}
}
@ -257,7 +257,7 @@ define apache::redhat::sslsite($ipaddr, $root, $ssl_cert, $ssl_key, $ssl_chain)
$site_conf = "/etc/httpd/site.https.d/${site_fqdn}.conf"
$site_confdir = "/etc/httpd/site.https.d/${site_fqdn}.d"
file { "${site_conf}":
file { $site_conf:
ensure => present,
content => template("apache/site.https.conf.erb"),
mode => 0644,
@ -268,7 +268,7 @@ define apache::redhat::sslsite($ipaddr, $root, $ssl_cert, $ssl_key, $ssl_chain)
File["/etc/pki/tls/private/${site_fqdn}.key"], ],
}
file { "${site_confdir}":
file { $site_confdir:
ensure => directory,
mode => 0644,
owner => root,
@ -278,7 +278,7 @@ define apache::redhat::sslsite($ipaddr, $root, $ssl_cert, $ssl_key, $ssl_chain)
recurse => true,
source => [ "puppet:///files/apache/sslsites/${site_fqdn}",
"puppet:///modules/custom/empty", ],
before => File["${site_conf}"],
before => File[$site_conf],
notify => Service["httpsd"],
}
@ -289,7 +289,7 @@ define apache::redhat::configfile($source, $content, $http, $https) {
if defined(Service["httpd"]) {
file { "/etc/httpd/conf.http.d/${name}":
ensure => $http ? {
ensure => $http ? {
true => present,
default => absent,
},
@ -322,7 +322,7 @@ define apache::redhat::configfile($source, $content, $http, $https) {
if defined(Service["httpsd"]) {
file { "/etc/httpd/conf.https.d/${name}":
ensure => $https ? {
ensure => $https ? {
true => present,
default => absent,
},