Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linting #51

Merged
merged 1 commit into from
May 8, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
}
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,
}
}
Expand All @@ -47,8 +47,8 @@
}
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,
}
}
Expand Down
5 changes: 4 additions & 1 deletion manifests/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
}
debian,ubuntu: {
class { 'nginx::package::debian':
class { 'nginx::package::debian':
require => Anchor['nginx::package::begin'],
before => Anchor['nginx::package::end'],
}
Expand All @@ -42,5 +42,8 @@
before => Anchor['nginx::package::end'],
}
}
default: {
fail("Module ${module_name} is not supported on ${::operatingsystem}")
}
}
}
6 changes: 3 additions & 3 deletions manifests/package/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -28,7 +28,7 @@
$os_rel = $::lsbmajdistrelease
}

yumrepo { "nginx-release":
yumrepo { 'nginx-release':
baseurl => "http://nginx.org/packages/${os_type}/${os_rel}/\$basearch/",
descr => 'nginx repo',
enabled => '1',
Expand Down
4 changes: 2 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
# 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

Expand Down
7 changes: 4 additions & 3 deletions manifests/resource/location.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -48,6 +48,7 @@
# }

define nginx::resource::location (
$location,
$ensure = present,
$vhost = undef,
$www_root = undef,
Expand All @@ -64,8 +65,8 @@
$stub_status = undef,
$location_cfg_prepend = undef,
$location_cfg_append = undef,
$try_files = undef,
$location) {
$try_files = undef
) {
File {
owner => 'root',
group => 'root',
Expand Down
2 changes: 1 addition & 1 deletion manifests/resource/mailhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '::',
Expand Down
4 changes: 2 additions & 2 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
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,
hasrestart => true,
subscribe => Exec['rebuild-nginx-vhosts', 'rebuild-nginx-mailhosts'],
}
if $configtest_enable == true {
Service["nginx"] {
Service['nginx'] {
restart => $service_restart,
}
}
Expand Down
6 changes: 3 additions & 3 deletions tests/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

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',
}