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 {
|
class apache::dev {
|
||||||
include apache::params
|
include apache::params
|
||||||
|
|
||||||
package { "apache_dev_package":
|
package { 'apache_dev_package':
|
||||||
|
ensure => installed,
|
||||||
name => $apache::params::apache_dev,
|
name => $apache::params::apache_dev,
|
||||||
ensure => installed
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,20 +16,20 @@ class apache {
|
|||||||
include apache::params
|
include apache::params
|
||||||
|
|
||||||
package { 'httpd':
|
package { 'httpd':
|
||||||
name => $apache::params::apache_name,
|
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
|
name => $apache::params::apache_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
service { 'httpd':
|
service { 'httpd':
|
||||||
name => $apache::params::apache_name,
|
|
||||||
ensure => running,
|
ensure => running,
|
||||||
|
name => $apache::params::apache_name,
|
||||||
enable => true,
|
enable => true,
|
||||||
subscribe => Package['httpd'],
|
subscribe => Package['httpd'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "httpd_vdir":
|
file { 'httpd_vdir':
|
||||||
path => $apache::params::vdir,
|
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
|
path => $apache::params::vdir,
|
||||||
recurse => true,
|
recurse => true,
|
||||||
purge => true,
|
purge => true,
|
||||||
notify => Service['httpd'],
|
notify => Service['httpd'],
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
class apache::mod::python {
|
class apache::mod::python {
|
||||||
include apache
|
include apache
|
||||||
|
|
||||||
package { "mod_python_package":
|
package { 'mod_python_package':
|
||||||
name => $apache::params::mod_python_package,
|
|
||||||
ensure => installed,
|
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 {
|
class apache::mod::wsgi {
|
||||||
include apache
|
include apache
|
||||||
|
|
||||||
package { "mod_wsgi_package":
|
package { 'mod_wsgi_package':
|
||||||
name => $apache::params::mod_wsgi_package,
|
|
||||||
ensure => installed,
|
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:
|
# Parameters:
|
||||||
# - The $user that Apache runs as
|
# - The $user that Apache runs as
|
||||||
# - The $group 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 $php_package is the name of the package that provided PHP
|
||||||
# - The $ssl_package is the name of the Apache SSL package
|
# - The $ssl_package is the name of the Apache SSL package
|
||||||
# - The $apache_dev is the name of the Apache development libraries package
|
# - The $apache_dev is the name of the Apache development libraries package
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
class apache::php {
|
class apache::php {
|
||||||
include apache::params
|
include apache::params
|
||||||
|
|
||||||
package { "apache_php_package":
|
package { 'apache_php_package':
|
||||||
name => $apache::params::php_package,
|
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
name => $apache::params::php_package,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,10 +16,10 @@ class apache::python {
|
|||||||
include apache::params
|
include apache::params
|
||||||
include apache
|
include apache
|
||||||
|
|
||||||
package { "apache_python_package":
|
package { 'apache_python_package':
|
||||||
name => $apache::params::python_package,
|
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
name => $apache::params::python_package,
|
||||||
}
|
}
|
||||||
a2mod { "python": ensure => present, }
|
a2mod { 'python': ensure => present, }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -18,14 +18,17 @@ class apache::ssl {
|
|||||||
|
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
'centos', 'fedora', 'redhat', 'scientific': {
|
'centos', 'fedora', 'redhat', 'scientific': {
|
||||||
package { "apache_ssl_package":
|
package { 'apache_ssl_package':
|
||||||
name => "$apache::params::ssl_package",
|
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
|
name => $apache::params::ssl_package,
|
||||||
require => Package['httpd'],
|
require => Package['httpd'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'ubuntu', 'debian': {
|
'ubuntu', 'debian': {
|
||||||
a2mod { "ssl": ensure => present, }
|
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 $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
|
# - The $configure_firewall option is set to true or false to specify if
|
||||||
# a firewall should be configured.
|
# 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 $priority of the site
|
||||||
# - The $serveraliases of the site
|
# - The $serveraliases of the site
|
||||||
# - The $options for the given vhost
|
# - The $options for the given vhost
|
||||||
@ -70,7 +71,7 @@ define apache::vhost(
|
|||||||
content => template($template),
|
content => template($template),
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '755',
|
mode => '0755',
|
||||||
require => Package['httpd'],
|
require => Package['httpd'],
|
||||||
notify => Service['httpd'],
|
notify => Service['httpd'],
|
||||||
}
|
}
|
||||||
@ -80,7 +81,7 @@ define apache::vhost(
|
|||||||
@firewall {
|
@firewall {
|
||||||
"0100-INPUT ACCEPT $port":
|
"0100-INPUT ACCEPT $port":
|
||||||
action => 'accept',
|
action => 'accept',
|
||||||
dport => "$port",
|
dport => '$port',
|
||||||
proto => 'tcp'
|
proto => 'tcp'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ define apache::vhost::proxy (
|
|||||||
$port,
|
$port,
|
||||||
$dest,
|
$dest,
|
||||||
$priority = '10',
|
$priority = '10',
|
||||||
$template = "apache/vhost-proxy.conf.erb",
|
$template = 'apache/vhost-proxy.conf.erb',
|
||||||
$servername = '',
|
$servername = '',
|
||||||
$serveraliases = '',
|
$serveraliases = '',
|
||||||
$ssl = false,
|
$ssl = false,
|
||||||
@ -44,7 +44,7 @@ define apache::vhost::proxy (
|
|||||||
content => template($template),
|
content => template($template),
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '755',
|
mode => '0755',
|
||||||
require => Package['httpd'],
|
require => Package['httpd'],
|
||||||
notify => Service['httpd'],
|
notify => Service['httpd'],
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# Define: apache::vhost::redirect
|
# 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:
|
# Parameters:
|
||||||
# $port:
|
# $port:
|
||||||
@ -21,7 +22,7 @@ define apache::vhost::redirect (
|
|||||||
$dest,
|
$dest,
|
||||||
$priority = '10',
|
$priority = '10',
|
||||||
$serveraliases = '',
|
$serveraliases = '',
|
||||||
$template = "apache/vhost-redirect.conf.erb",
|
$template = 'apache/vhost-redirect.conf.erb',
|
||||||
$vhost_name = '*'
|
$vhost_name = '*'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ define apache::vhost::redirect (
|
|||||||
content => template($template),
|
content => template($template),
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '755',
|
mode => '0755',
|
||||||
require => Package['httpd'],
|
require => Package['httpd'],
|
||||||
notify => Service['httpd'],
|
notify => Service['httpd'],
|
||||||
}
|
}
|
||||||
@ -43,7 +44,7 @@ define apache::vhost::redirect (
|
|||||||
@firewall {
|
@firewall {
|
||||||
"0100-INPUT ACCEPT $port":
|
"0100-INPUT ACCEPT $port":
|
||||||
jump => 'ACCEPT',
|
jump => 'ACCEPT',
|
||||||
dport => "$port",
|
dport => '$port',
|
||||||
proto => 'tcp'
|
proto => 'tcp'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user