Merge pull request #22 from eshamow/style_guide_fixup
Changes to match style guide and pass puppet-lint without error
This commit is contained in:
commit
7b96288724
@ -14,8 +14,8 @@
|
||||
class apache::dev {
|
||||
include apache::params
|
||||
|
||||
package { "apache_dev_package":
|
||||
name => $apache::params::apache_dev,
|
||||
ensure => installed
|
||||
package { 'apache_dev_package':
|
||||
ensure => installed,
|
||||
name => $apache::params::apache_dev,
|
||||
}
|
||||
}
|
||||
|
@ -16,20 +16,20 @@ class apache {
|
||||
include apache::params
|
||||
|
||||
package { 'httpd':
|
||||
name => $apache::params::apache_name,
|
||||
ensure => installed,
|
||||
name => $apache::params::apache_name,
|
||||
}
|
||||
|
||||
service { 'httpd':
|
||||
name => $apache::params::apache_name,
|
||||
ensure => running,
|
||||
name => $apache::params::apache_name,
|
||||
enable => true,
|
||||
subscribe => Package['httpd'],
|
||||
}
|
||||
|
||||
file { "httpd_vdir":
|
||||
path => $apache::params::vdir,
|
||||
file { 'httpd_vdir':
|
||||
ensure => directory,
|
||||
path => $apache::params::vdir,
|
||||
recurse => true,
|
||||
purge => true,
|
||||
notify => Service['httpd'],
|
||||
|
@ -1,13 +1,13 @@
|
||||
class apache::mod::python {
|
||||
include apache
|
||||
|
||||
package { "mod_python_package":
|
||||
name => $apache::params::mod_python_package,
|
||||
package { 'mod_python_package':
|
||||
ensure => installed,
|
||||
require => Package["httpd"];
|
||||
name => $apache::params::mod_python_package,
|
||||
require => Package['httpd'];
|
||||
}
|
||||
|
||||
a2mod { "python": ensure => present; }
|
||||
a2mod { 'python': ensure => present; }
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
class apache::mod::wsgi {
|
||||
include apache
|
||||
|
||||
package { "mod_wsgi_package":
|
||||
name => $apache::params::mod_wsgi_package,
|
||||
package { 'mod_wsgi_package':
|
||||
ensure => installed,
|
||||
require => Package["httpd"];
|
||||
name => $apache::params::mod_wsgi_package,
|
||||
require => Package['httpd'];
|
||||
}
|
||||
|
||||
a2mod { "wsgi": ensure => present; }
|
||||
a2mod { 'wsgi': ensure => present; }
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,8 @@
|
||||
# Parameters:
|
||||
# - The $user that Apache runs as
|
||||
# - The $group that Apache runs as
|
||||
# - The $apache_name is the name of the package and service on the relevant distribution
|
||||
# - The $apache_name is the name of the package and service on the relevant
|
||||
# distribution
|
||||
# - The $php_package is the name of the package that provided PHP
|
||||
# - The $ssl_package is the name of the Apache SSL package
|
||||
# - The $apache_dev is the name of the Apache development libraries package
|
||||
@ -32,31 +33,31 @@ class apache::params {
|
||||
|
||||
case $::operatingsystem {
|
||||
'centos', 'redhat', 'fedora', 'scientific': {
|
||||
$apache_name = 'httpd'
|
||||
$php_package = 'php'
|
||||
$mod_python_package = 'mod_python'
|
||||
$mod_wsgi_package = 'mod_wsgi'
|
||||
$ssl_package = 'mod_ssl'
|
||||
$apache_dev = 'httpd-devel'
|
||||
$vdir = '/etc/httpd/conf.d/'
|
||||
$apache_name = 'httpd'
|
||||
$php_package = 'php'
|
||||
$mod_python_package = 'mod_python'
|
||||
$mod_wsgi_package = 'mod_wsgi'
|
||||
$ssl_package = 'mod_ssl'
|
||||
$apache_dev = 'httpd-devel'
|
||||
$vdir = '/etc/httpd/conf.d/'
|
||||
}
|
||||
'ubuntu', 'debian': {
|
||||
$apache_name = 'apache2'
|
||||
$php_package = 'libapache2-mod-php5'
|
||||
$mod_python_package = 'libapache2-mod-python'
|
||||
$mod_wsgi_package = 'libapache2-mod-wsgi'
|
||||
$ssl_package = 'apache-ssl'
|
||||
$apache_dev = [ 'libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev' ]
|
||||
$vdir = '/etc/apache2/sites-enabled/'
|
||||
$apache_name = 'apache2'
|
||||
$php_package = 'libapache2-mod-php5'
|
||||
$mod_python_package = 'libapache2-mod-python'
|
||||
$mod_wsgi_package = 'libapache2-mod-wsgi'
|
||||
$ssl_package = 'apache-ssl'
|
||||
$apache_dev = ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev']
|
||||
$vdir = '/etc/apache2/sites-enabled/'
|
||||
}
|
||||
default: {
|
||||
$apache_name = 'apache2'
|
||||
$php_package = 'libapache2-mod-php5'
|
||||
$mod_python_package = 'libapache2-mod-python'
|
||||
$mod_wsgi_package = 'libapache2-mod-wsgi'
|
||||
$ssl_package = 'apache-ssl'
|
||||
$apache_dev = 'apache-dev'
|
||||
$vdir = '/etc/apache2/sites-enabled/'
|
||||
$apache_name = 'apache2'
|
||||
$php_package = 'libapache2-mod-php5'
|
||||
$mod_python_package = 'libapache2-mod-python'
|
||||
$mod_wsgi_package = 'libapache2-mod-wsgi'
|
||||
$ssl_package = 'apache-ssl'
|
||||
$apache_dev = 'apache-dev'
|
||||
$vdir = '/etc/apache2/sites-enabled/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,8 @@
|
||||
class apache::php {
|
||||
include apache::params
|
||||
|
||||
package { "apache_php_package":
|
||||
name => $apache::params::php_package,
|
||||
package { 'apache_php_package':
|
||||
ensure => present,
|
||||
name => $apache::params::php_package,
|
||||
}
|
||||
}
|
||||
|
@ -13,13 +13,13 @@
|
||||
# Sample Usage:
|
||||
#
|
||||
class apache::python {
|
||||
include apache::params
|
||||
include apache
|
||||
include apache::params
|
||||
include apache
|
||||
|
||||
package { "apache_python_package":
|
||||
name => $apache::params::python_package,
|
||||
package { 'apache_python_package':
|
||||
ensure => present,
|
||||
name => $apache::params::python_package,
|
||||
}
|
||||
a2mod { "python": ensure => present, }
|
||||
a2mod { 'python': ensure => present, }
|
||||
|
||||
}
|
||||
|
@ -17,15 +17,18 @@ class apache::ssl {
|
||||
include apache
|
||||
|
||||
case $::operatingsystem {
|
||||
'centos', 'fedora', 'redhat', 'scientific': {
|
||||
package { "apache_ssl_package":
|
||||
name => "$apache::params::ssl_package",
|
||||
ensure => installed,
|
||||
require => Package['httpd'],
|
||||
}
|
||||
}
|
||||
'ubuntu', 'debian': {
|
||||
a2mod { "ssl": ensure => present, }
|
||||
}
|
||||
'centos', 'fedora', 'redhat', 'scientific': {
|
||||
package { 'apache_ssl_package':
|
||||
ensure => installed,
|
||||
name => $apache::params::ssl_package,
|
||||
require => Package['httpd'],
|
||||
}
|
||||
}
|
||||
'ubuntu', 'debian': {
|
||||
a2mod { 'ssl': ensure => present, }
|
||||
}
|
||||
default: {
|
||||
fail( "${::operatingsystem} not defined in apache::ssl.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,8 @@
|
||||
# - The $ssl option is set true or false to enable SSL for this Virtual Host
|
||||
# - The $configure_firewall option is set to true or false to specify if
|
||||
# a firewall should be configured.
|
||||
# - The $template option specifies whether to use the default template or override
|
||||
# - The $template option specifies whether to use the default template or
|
||||
# override
|
||||
# - The $priority of the site
|
||||
# - The $serveraliases of the site
|
||||
# - The $options for the given vhost
|
||||
@ -70,7 +71,7 @@ define apache::vhost(
|
||||
content => template($template),
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '755',
|
||||
mode => '0755',
|
||||
require => Package['httpd'],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
@ -80,8 +81,8 @@ define apache::vhost(
|
||||
@firewall {
|
||||
"0100-INPUT ACCEPT $port":
|
||||
action => 'accept',
|
||||
dport => "$port",
|
||||
proto => 'tcp'
|
||||
dport => '$port',
|
||||
proto => 'tcp'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ define apache::vhost::proxy (
|
||||
$port,
|
||||
$dest,
|
||||
$priority = '10',
|
||||
$template = "apache/vhost-proxy.conf.erb",
|
||||
$template = 'apache/vhost-proxy.conf.erb',
|
||||
$servername = '',
|
||||
$serveraliases = '',
|
||||
$ssl = false,
|
||||
@ -44,7 +44,7 @@ define apache::vhost::proxy (
|
||||
content => template($template),
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '755',
|
||||
mode => '0755',
|
||||
require => Package['httpd'],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Define: apache::vhost::redirect
|
||||
#
|
||||
# This class will create a vhost that does nothing more than redirect to a given location
|
||||
# This class will create a vhost that does nothing more than redirect to a
|
||||
# given location
|
||||
#
|
||||
# Parameters:
|
||||
# $port:
|
||||
@ -21,7 +22,7 @@ define apache::vhost::redirect (
|
||||
$dest,
|
||||
$priority = '10',
|
||||
$serveraliases = '',
|
||||
$template = "apache/vhost-redirect.conf.erb",
|
||||
$template = 'apache/vhost-redirect.conf.erb',
|
||||
$vhost_name = '*'
|
||||
) {
|
||||
|
||||
@ -34,7 +35,7 @@ define apache::vhost::redirect (
|
||||
content => template($template),
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '755',
|
||||
mode => '0755',
|
||||
require => Package['httpd'],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
@ -43,7 +44,7 @@ define apache::vhost::redirect (
|
||||
@firewall {
|
||||
"0100-INPUT ACCEPT $port":
|
||||
jump => 'ACCEPT',
|
||||
dport => "$port",
|
||||
dport => '$port',
|
||||
proto => 'tcp'
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user