linting
This commit is contained in:
parent
34e41b75a9
commit
4bcb0993c1
8 changed files with 23 additions and 19 deletions
|
@ -36,8 +36,8 @@ class nginx::config(
|
|||
}
|
||||
if $confd_purge == true {
|
||||
File["${nginx::params::nx_conf_dir}/conf.d"] {
|
||||
ignore => "vhost_autogen.conf",
|
||||
purge => true,
|
||||
ignore => 'vhost_autogen.conf',
|
||||
purge => true,
|
||||
recurse => true,
|
||||
}
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ class nginx::config(
|
|||
}
|
||||
if $confd_purge == true {
|
||||
File["${nginx::params::nx_conf_dir}/conf.mail.d"] {
|
||||
ignore => "vhost_autogen.conf",
|
||||
purge => true,
|
||||
ignore => 'vhost_autogen.conf',
|
||||
purge => true,
|
||||
recurse => true,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class nginx::package {
|
|||
}
|
||||
}
|
||||
debian,ubuntu: {
|
||||
class { 'nginx::package::debian':
|
||||
class { 'nginx::package::debian':
|
||||
require => Anchor['nginx::package::begin'],
|
||||
before => Anchor['nginx::package::end'],
|
||||
}
|
||||
|
@ -42,5 +42,8 @@ class nginx::package {
|
|||
before => Anchor['nginx::package::end'],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Module ${module_name} is not supported on ${::operatingsystem}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
class nginx::package::redhat {
|
||||
$redhat_packages = ['nginx', 'GeoIP', 'gd', 'libXpm', 'libxslt']
|
||||
|
||||
if downcase($::operatingsystem) == "redhat" {
|
||||
$os_type = "rhel"
|
||||
if downcase($::operatingsystem) == 'redhat' {
|
||||
$os_type = 'rhel'
|
||||
} else {
|
||||
$os_type = downcase($::operatingsystem)
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class nginx::package::redhat {
|
|||
$os_rel = $::lsbmajdistrelease
|
||||
}
|
||||
|
||||
yumrepo { "nginx-release":
|
||||
yumrepo { 'nginx-release':
|
||||
baseurl => "http://nginx.org/packages/${os_type}/${os_rel}/\$basearch/",
|
||||
descr => 'nginx repo',
|
||||
enabled => '1',
|
||||
|
|
|
@ -64,8 +64,8 @@ class nginx::params {
|
|||
# Service restart after Nginx 0.7.53 could also be just "/path/to/nginx/bin -s HUP"
|
||||
# Some init scripts do a configtest, some don't. If configtest_enable it's true
|
||||
# then service restart will take $nx_service_restart value, forcing configtest.
|
||||
$nx_configtest_enable = false
|
||||
$nx_service_restart = "/etc/init.d/nginx configtest && /etc/init.d/nginx restart"
|
||||
$nx_configtest_enable = false
|
||||
$nx_service_restart = '/etc/init.d/nginx configtest && /etc/init.d/nginx restart'
|
||||
|
||||
$nx_mail = false
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# with nginx::resource::upstream
|
||||
# [*proxy_read_timeout*] - Override the default the proxy read timeout value of 90 seconds
|
||||
# [*ssl*] - Indicates whether to setup SSL bindings for this location.
|
||||
# [*ssl_only*] - Required if the SSL and normal vHost have the same port.
|
||||
# [*ssl_only*] - Required if the SSL and normal vHost have the same port.
|
||||
# [*location_alias*] - Path to be used as basis for serving requests for this location
|
||||
# [*stub_status*] - If true it will point configure module stub_status to provide nginx stats on location
|
||||
# [*location_cfg_prepend*] - It expects a hash with custom directives to put before anything else inside location
|
||||
|
@ -48,6 +48,7 @@
|
|||
# }
|
||||
|
||||
define nginx::resource::location (
|
||||
$location,
|
||||
$ensure = present,
|
||||
$vhost = undef,
|
||||
$www_root = undef,
|
||||
|
@ -64,8 +65,8 @@ define nginx::resource::location (
|
|||
$stub_status = undef,
|
||||
$location_cfg_prepend = undef,
|
||||
$location_cfg_append = undef,
|
||||
$try_files = undef,
|
||||
$location) {
|
||||
$try_files = undef
|
||||
) {
|
||||
File {
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
|
|
|
@ -42,9 +42,9 @@
|
|||
# ssl_key => '/tmp/server.pem',
|
||||
# }
|
||||
define nginx::resource::mailhost (
|
||||
$listen_port,
|
||||
$ensure = 'enable',
|
||||
$listen_ip = '*',
|
||||
$listen_port,
|
||||
$listen_options = undef,
|
||||
$ipv6_enable = false,
|
||||
$ipv6_listen_ip = '::',
|
||||
|
|
|
@ -29,7 +29,7 @@ class nginx::service(
|
|||
unless => "/usr/bin/test ! -f ${nginx::params::nx_temp_dir}/nginx.mail.d/*",
|
||||
subscribe => File["${nginx::params::nx_temp_dir}/nginx.mail.d"],
|
||||
}
|
||||
service { "nginx":
|
||||
service { 'nginx':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasstatus => true,
|
||||
|
@ -37,7 +37,7 @@ class nginx::service(
|
|||
subscribe => Exec['rebuild-nginx-vhosts', 'rebuild-nginx-mailhosts'],
|
||||
}
|
||||
if $configtest_enable == true {
|
||||
Service["nginx"] {
|
||||
Service['nginx'] {
|
||||
restart => $service_restart,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,15 +2,15 @@ include nginx
|
|||
|
||||
nginx::resource::vhost { 'test.local':
|
||||
ensure => present,
|
||||
ipv6_enable => 'true',
|
||||
ipv6_enable => true,
|
||||
proxy => 'http://proxypass',
|
||||
}
|
||||
|
||||
nginx::resource::vhost { 'test.local:8080':
|
||||
ensure => present,
|
||||
listen_port => 8080,
|
||||
server_name => 'test.local',
|
||||
ensure => present,
|
||||
ipv6_enable => 'true',
|
||||
ipv6_enable => true,
|
||||
proxy => 'http://proxypass',
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue