Add Gemfile and puppet 4 checks
In anticipation of puppet 4, start trying to deal with puppet 4 things that can be helpfully predicted by puppet lint plugins. Also fix errors caught by the puppet-lint-unquoted_string-check and puppet-lint-absolute_classname-check gems. Change-Id: I9d74d25d2f2c95ec52a6db3bf070903240e1b933
This commit is contained in:
parent
eedc2abb66
commit
17430b7507
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
.pkg
|
Gemfile.lock
|
||||||
|
.bundled_gems/
|
||||||
|
30
Gemfile
Normal file
30
Gemfile
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
|
group :development, :test do
|
||||||
|
gem 'puppetlabs_spec_helper', :require => false
|
||||||
|
|
||||||
|
gem 'metadata-json-lint'
|
||||||
|
# This is nice and all, but let's not worry about it until we've actually
|
||||||
|
# got puppet 4.x sorted
|
||||||
|
# gem 'puppet-lint-param-docs'
|
||||||
|
gem 'puppet-lint-absolute_classname-check'
|
||||||
|
gem 'puppet-lint-absolute_template_path'
|
||||||
|
gem 'puppet-lint-trailing_newline-check'
|
||||||
|
|
||||||
|
# Puppet 4.x related lint checks
|
||||||
|
gem 'puppet-lint-unquoted_string-check'
|
||||||
|
gem 'puppet-lint-empty_string-check'
|
||||||
|
gem 'puppet-lint-leading_zero-check'
|
||||||
|
gem 'puppet-lint-variable_contains_upcase'
|
||||||
|
gem 'puppet-lint-spaceship_operator_without_tag-check'
|
||||||
|
gem 'puppet-lint-undef_in_function-check'
|
||||||
|
|
||||||
|
if puppetversion = ENV['PUPPET_GEM_VERSION']
|
||||||
|
gem 'puppet', puppetversion, :require => false
|
||||||
|
else
|
||||||
|
gem 'puppet', '~> 3.0', :require => false
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
# vim:ft=ruby
|
@ -12,7 +12,7 @@
|
|||||||
# Sample Usage:
|
# Sample Usage:
|
||||||
#
|
#
|
||||||
class httpd::dev {
|
class httpd::dev {
|
||||||
include httpd::params
|
include ::httpd::params
|
||||||
|
|
||||||
package { 'apache_dev_package':
|
package { 'apache_dev_package':
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# Sample Usage:
|
# Sample Usage:
|
||||||
#
|
#
|
||||||
class httpd {
|
class httpd {
|
||||||
include httpd::params
|
include ::httpd::params
|
||||||
|
|
||||||
package { 'httpd':
|
package { 'httpd':
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# Sample Usage:
|
# Sample Usage:
|
||||||
#
|
#
|
||||||
class httpd::mod::python {
|
class httpd::mod::python {
|
||||||
include httpd
|
include ::httpd
|
||||||
|
|
||||||
package { 'mod_python_package':
|
package { 'mod_python_package':
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# Sample Usage:
|
# Sample Usage:
|
||||||
#
|
#
|
||||||
class httpd::mod::wsgi {
|
class httpd::mod::wsgi {
|
||||||
include httpd
|
include ::httpd
|
||||||
|
|
||||||
package { 'mod_wsgi_package':
|
package { 'mod_wsgi_package':
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
|
@ -24,8 +24,8 @@ class httpd::params {
|
|||||||
$ssl = true
|
$ssl = true
|
||||||
$template = 'httpd/vhost-default.conf.erb'
|
$template = 'httpd/vhost-default.conf.erb'
|
||||||
$priority = '25'
|
$priority = '25'
|
||||||
$servername = ''
|
$servername = undef
|
||||||
$serveraliases = ''
|
$serveraliases = undef
|
||||||
$auth = false
|
$auth = false
|
||||||
$redirect_ssl = false
|
$redirect_ssl = false
|
||||||
$options = 'Indexes FollowSymLinks MultiViews'
|
$options = 'Indexes FollowSymLinks MultiViews'
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# Sample Usage:
|
# Sample Usage:
|
||||||
#
|
#
|
||||||
class httpd::php {
|
class httpd::php {
|
||||||
include httpd::params
|
include ::httpd::params
|
||||||
|
|
||||||
package { 'apache_php_package':
|
package { 'apache_php_package':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
# Sample Usage:
|
# Sample Usage:
|
||||||
#
|
#
|
||||||
class httpd::python {
|
class httpd::python {
|
||||||
include httpd::params
|
include ::httpd::params
|
||||||
include httpd
|
include ::httpd
|
||||||
|
|
||||||
package { 'apache_python_package':
|
package { 'apache_python_package':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#
|
#
|
||||||
class httpd::ssl {
|
class httpd::ssl {
|
||||||
|
|
||||||
include httpd
|
include ::httpd
|
||||||
|
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
'centos', 'fedora', 'redhat', 'scientific': {
|
'centos', 'fedora', 'redhat', 'scientific': {
|
||||||
|
@ -44,16 +44,16 @@ define httpd::vhost(
|
|||||||
$vhost_name = $httpd::params::vhost_name
|
$vhost_name = $httpd::params::vhost_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include httpd
|
include ::httpd
|
||||||
|
|
||||||
if $servername == '' {
|
if $servername == undef {
|
||||||
$srvname = $name
|
$srvname = $name
|
||||||
} else {
|
} else {
|
||||||
$srvname = $servername
|
$srvname = $servername
|
||||||
}
|
}
|
||||||
|
|
||||||
if $ssl == true {
|
if $ssl == true {
|
||||||
include httpd::ssl
|
include ::httpd::ssl
|
||||||
}
|
}
|
||||||
|
|
||||||
# Since the template will use auth, redirect to https requires mod_rewrite
|
# Since the template will use auth, redirect to https requires mod_rewrite
|
||||||
|
@ -23,24 +23,24 @@ define httpd::vhost::proxy (
|
|||||||
$dest,
|
$dest,
|
||||||
$priority = '10',
|
$priority = '10',
|
||||||
$template = 'httpd/vhost-proxy.conf.erb',
|
$template = 'httpd/vhost-proxy.conf.erb',
|
||||||
$servername = '',
|
$servername = undef,
|
||||||
$serveraliases = '',
|
$serveraliases = undef,
|
||||||
$ssl = false,
|
$ssl = false,
|
||||||
$vhost_name = '*'
|
$vhost_name = '*'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include httpd
|
include ::httpd
|
||||||
|
|
||||||
$apache_name = $httpd::params::apache_name
|
$apache_name = $httpd::params::apache_name
|
||||||
$ssl_path = $httpd::params::ssl_path
|
$ssl_path = $httpd::params::ssl_path
|
||||||
if $servername == '' {
|
if $servername == undef {
|
||||||
$srvname = $name
|
$srvname = $name
|
||||||
} else {
|
} else {
|
||||||
$srvname = $servername
|
$srvname = $servername
|
||||||
}
|
}
|
||||||
|
|
||||||
if $ssl == true {
|
if $ssl == true {
|
||||||
include httpd::ssl
|
include ::httpd::ssl
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "${priority}-${name}":
|
file { "${priority}-${name}":
|
||||||
|
@ -21,12 +21,12 @@ define httpd::vhost::redirect (
|
|||||||
$port,
|
$port,
|
||||||
$dest,
|
$dest,
|
||||||
$priority = '10',
|
$priority = '10',
|
||||||
$serveraliases = '',
|
$serveraliases = undef,
|
||||||
$template = 'httpd/vhost-redirect.conf.erb',
|
$template = 'httpd/vhost-redirect.conf.erb',
|
||||||
$vhost_name = '*'
|
$vhost_name = '*'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include httpd
|
include ::httpd
|
||||||
|
|
||||||
$srvname = $name
|
$srvname = $name
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
|||||||
ServerName <%= @srvname %>
|
ServerName <%= @srvname %>
|
||||||
<% if @serveraliases.is_a? Array -%>
|
<% if @serveraliases.is_a? Array -%>
|
||||||
<% @serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%>
|
<% @serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%>
|
||||||
<% elsif @serveraliases != '' -%>
|
<% elsif @serveraliases != nil -%>
|
||||||
<%= " ServerAlias #{@serveraliases}" -%>
|
<%= " ServerAlias #{@serveraliases}" -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
DocumentRoot <%= @docroot %>
|
DocumentRoot <%= @docroot %>
|
||||||
|
@ -8,7 +8,7 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
|||||||
ServerName <%= @srvname %>
|
ServerName <%= @srvname %>
|
||||||
<% if @serveraliases.is_a? Array %>
|
<% if @serveraliases.is_a? Array %>
|
||||||
<% @serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %>
|
<% @serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %>
|
||||||
<% elsif @serveraliases != '' %>
|
<% elsif @serveraliases != nil %>
|
||||||
<%= " ServerAlias #{@serveraliases}" %>
|
<%= " ServerAlias #{@serveraliases}" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
ProxyRequests Off
|
ProxyRequests Off
|
||||||
|
@ -3,7 +3,7 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
|||||||
ServerName <%= @srvname %>
|
ServerName <%= @srvname %>
|
||||||
<% if @serveraliases.is_a? Array %>
|
<% if @serveraliases.is_a? Array %>
|
||||||
<% @serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %>
|
<% @serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %>
|
||||||
<% elsif @serveraliases != '' %>
|
<% elsif @serveraliases != nil %>
|
||||||
<%= " ServerAlias #{@serveraliases}" %>
|
<%= " ServerAlias #{@serveraliases}" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
Redirect / <%= @dest %>/
|
Redirect / <%= @dest %>/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user