Skip to content

Commit 42c6363

Browse files
author
Eric Shamow
committed
Changes to match style guide and pass puppet-lint without error
No substantive behavior changes - only spacing, line alignment, quotation, etc.
1 parent 7f70d12 commit 42c6363

File tree

11 files changed

+70
-64
lines changed

11 files changed

+70
-64
lines changed

manifests/dev.pp

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
class apache::dev {
1515
include apache::params
1616

17-
package { "apache_dev_package":
18-
name => $apache::params::apache_dev,
19-
ensure => installed
17+
package { 'apache_dev_package':
18+
ensure => installed,
19+
name => $apache::params::apache_dev,
2020
}
2121
}

manifests/init.pp

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@
1616
include apache::params
1717

1818
package { 'httpd':
19-
name => $apache::params::apache_name,
2019
ensure => installed,
20+
name => $apache::params::apache_name,
2121
}
2222

2323
service { 'httpd':
24-
name => $apache::params::apache_name,
2524
ensure => running,
25+
name => $apache::params::apache_name,
2626
enable => true,
2727
subscribe => Package['httpd'],
2828
}
2929

30-
file { "httpd_vdir":
31-
path => $apache::params::vdir,
30+
file { 'httpd_vdir':
3231
ensure => directory,
32+
path => $apache::params::vdir,
3333
recurse => true,
3434
purge => true,
3535
notify => Service['httpd'],

manifests/mod/python.pp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
class apache::mod::python {
22
include apache
33

4-
package { "mod_python_package":
5-
name => $apache::params::mod_python_package,
4+
package { 'mod_python_package':
65
ensure => installed,
7-
require => Package["httpd"];
6+
name => $apache::params::mod_python_package,
7+
require => Package['httpd'];
88
}
99

10-
a2mod { "python": ensure => present; }
10+
a2mod { 'python': ensure => present; }
1111

1212
}
1313

manifests/mod/wsgi.pp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
class apache::mod::wsgi {
22
include apache
33

4-
package { "mod_wsgi_package":
5-
name => $apache::params::mod_wsgi_package,
4+
package { 'mod_wsgi_package':
65
ensure => installed,
7-
require => Package["httpd"];
6+
name => $apache::params::mod_wsgi_package,
7+
require => Package['httpd'];
88
}
99

10-
a2mod { "wsgi": ensure => present; }
10+
a2mod { 'wsgi': ensure => present; }
1111

1212
}
1313

manifests/params.pp

+23-22
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# Parameters:
66
# - The $user that Apache runs as
77
# - The $group that Apache runs as
8-
# - The $apache_name is the name of the package and service on the relevant distribution
8+
# - The $apache_name is the name of the package and service on the relevant
9+
# distribution
910
# - The $php_package is the name of the package that provided PHP
1011
# - The $ssl_package is the name of the Apache SSL package
1112
# - The $apache_dev is the name of the Apache development libraries package
@@ -32,31 +33,31 @@
3233

3334
case $::operatingsystem {
3435
'centos', 'redhat', 'fedora', 'scientific': {
35-
$apache_name = 'httpd'
36-
$php_package = 'php'
37-
$mod_python_package = 'mod_python'
38-
$mod_wsgi_package = 'mod_wsgi'
39-
$ssl_package = 'mod_ssl'
40-
$apache_dev = 'httpd-devel'
41-
$vdir = '/etc/httpd/conf.d/'
36+
$apache_name = 'httpd'
37+
$php_package = 'php'
38+
$mod_python_package = 'mod_python'
39+
$mod_wsgi_package = 'mod_wsgi'
40+
$ssl_package = 'mod_ssl'
41+
$apache_dev = 'httpd-devel'
42+
$vdir = '/etc/httpd/conf.d/'
4243
}
4344
'ubuntu', 'debian': {
44-
$apache_name = 'apache2'
45-
$php_package = 'libapache2-mod-php5'
46-
$mod_python_package = 'libapache2-mod-python'
47-
$mod_wsgi_package = 'libapache2-mod-wsgi'
48-
$ssl_package = 'apache-ssl'
49-
$apache_dev = [ 'libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev' ]
50-
$vdir = '/etc/apache2/sites-enabled/'
45+
$apache_name = 'apache2'
46+
$php_package = 'libapache2-mod-php5'
47+
$mod_python_package = 'libapache2-mod-python'
48+
$mod_wsgi_package = 'libapache2-mod-wsgi'
49+
$ssl_package = 'apache-ssl'
50+
$apache_dev = ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev']
51+
$vdir = '/etc/apache2/sites-enabled/'
5152
}
5253
default: {
53-
$apache_name = 'apache2'
54-
$php_package = 'libapache2-mod-php5'
55-
$mod_python_package = 'libapache2-mod-python'
56-
$mod_wsgi_package = 'libapache2-mod-wsgi'
57-
$ssl_package = 'apache-ssl'
58-
$apache_dev = 'apache-dev'
59-
$vdir = '/etc/apache2/sites-enabled/'
54+
$apache_name = 'apache2'
55+
$php_package = 'libapache2-mod-php5'
56+
$mod_python_package = 'libapache2-mod-python'
57+
$mod_wsgi_package = 'libapache2-mod-wsgi'
58+
$ssl_package = 'apache-ssl'
59+
$apache_dev = 'apache-dev'
60+
$vdir = '/etc/apache2/sites-enabled/'
6061
}
6162
}
6263
}

manifests/php.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
class apache::php {
1616
include apache::params
1717

18-
package { "apache_php_package":
19-
name => $apache::params::php_package,
18+
package { 'apache_php_package':
2019
ensure => present,
20+
name => $apache::params::php_package,
2121
}
2222
}

manifests/python.pp

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
# Sample Usage:
1414
#
1515
class apache::python {
16-
include apache::params
17-
include apache
16+
include apache::params
17+
include apache
1818

19-
package { "apache_python_package":
20-
name => $apache::params::python_package,
19+
package { 'apache_python_package':
2120
ensure => present,
21+
name => $apache::params::python_package,
2222
}
23-
a2mod { "python": ensure => present, }
23+
a2mod { 'python': ensure => present, }
2424

2525
}

manifests/ssl.pp

+13-10
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@
1717
include apache
1818

1919
case $::operatingsystem {
20-
'centos', 'fedora', 'redhat', 'scientific': {
21-
package { "apache_ssl_package":
22-
name => "$apache::params::ssl_package",
23-
ensure => installed,
24-
require => Package['httpd'],
25-
}
26-
}
27-
'ubuntu', 'debian': {
28-
a2mod { "ssl": ensure => present, }
29-
}
20+
'centos', 'fedora', 'redhat', 'scientific': {
21+
package { 'apache_ssl_package':
22+
ensure => installed,
23+
name => $apache::params::ssl_package,
24+
require => Package['httpd'],
25+
}
26+
}
27+
'ubuntu', 'debian': {
28+
a2mod { 'ssl': ensure => present, }
29+
}
30+
default: {
31+
fail( "${::operatingsystem} not defined in apache::ssl.")
32+
}
3033
}
3134
}

manifests/vhost.pp

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
# - The $ssl option is set true or false to enable SSL for this Virtual Host
99
# - The $configure_firewall option is set to true or false to specify if
1010
# a firewall should be configured.
11-
# - The $template option specifies whether to use the default template or override
11+
# - The $template option specifies whether to use the default template or
12+
# override
1213
# - The $priority of the site
1314
# - The $serveraliases of the site
1415
# - The $options for the given vhost
@@ -70,7 +71,7 @@
7071
content => template($template),
7172
owner => 'root',
7273
group => 'root',
73-
mode => '755',
74+
mode => '0755',
7475
require => Package['httpd'],
7576
notify => Service['httpd'],
7677
}
@@ -80,8 +81,8 @@
8081
@firewall {
8182
"0100-INPUT ACCEPT $port":
8283
action => 'accept',
83-
dport => "$port",
84-
proto => 'tcp'
84+
dport => '$port',
85+
proto => 'tcp'
8586
}
8687
}
8788
}

manifests/vhost/proxy.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
$port,
2323
$dest,
2424
$priority = '10',
25-
$template = "apache/vhost-proxy.conf.erb",
25+
$template = 'apache/vhost-proxy.conf.erb',
2626
$servername = '',
2727
$serveraliases = '',
2828
$ssl = false,
@@ -44,7 +44,7 @@
4444
content => template($template),
4545
owner => 'root',
4646
group => 'root',
47-
mode => '755',
47+
mode => '0755',
4848
require => Package['httpd'],
4949
notify => Service['httpd'],
5050
}

manifests/vhost/redirect.pp

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Define: apache::vhost::redirect
22
#
3-
# This class will create a vhost that does nothing more than redirect to a given location
3+
# This class will create a vhost that does nothing more than redirect to a
4+
# given location
45
#
56
# Parameters:
67
# $port:
@@ -21,7 +22,7 @@
2122
$dest,
2223
$priority = '10',
2324
$serveraliases = '',
24-
$template = "apache/vhost-redirect.conf.erb",
25+
$template = 'apache/vhost-redirect.conf.erb',
2526
$vhost_name = '*'
2627
) {
2728

@@ -34,7 +35,7 @@
3435
content => template($template),
3536
owner => 'root',
3637
group => 'root',
37-
mode => '755',
38+
mode => '0755',
3839
require => Package['httpd'],
3940
notify => Service['httpd'],
4041
}
@@ -43,7 +44,7 @@
4344
@firewall {
4445
"0100-INPUT ACCEPT $port":
4546
jump => 'ACCEPT',
46-
dport => "$port",
47+
dport => '$port',
4748
proto => 'tcp'
4849
}
4950
}

0 commit comments

Comments
 (0)