summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-08-11 05:07:50 +0000
committerGerrit Code Review <review@openstack.org>2015-08-11 05:07:50 +0000
commitd2e06d732b31686c6ba8ac4192800aae4899e997 (patch)
tree893ece2711b8decdd658bbd8c18f3caeb065ff35
parent85469bb95e1cafacd314d7b0acc90ed83e112907 (diff)
parent17430b75071d801ec8b5b0bc2eb3b0fe6bc9bb04 (diff)
Merge "Add Gemfile and puppet 4 checks"
-rw-r--r--.gitignore3
-rw-r--r--Gemfile30
-rw-r--r--manifests/dev.pp2
-rw-r--r--manifests/init.pp2
-rw-r--r--manifests/mod/python.pp2
-rw-r--r--manifests/mod/wsgi.pp2
-rw-r--r--manifests/params.pp4
-rw-r--r--manifests/php.pp2
-rw-r--r--manifests/python.pp4
-rw-r--r--manifests/ssl.pp2
-rw-r--r--manifests/vhost.pp6
-rw-r--r--manifests/vhost/proxy.pp10
-rw-r--r--manifests/vhost/redirect.pp4
-rw-r--r--templates/vhost-default.conf.erb2
-rw-r--r--templates/vhost-proxy.conf.erb2
-rw-r--r--templates/vhost-redirect.conf.erb2
16 files changed, 55 insertions, 24 deletions
diff --git a/.gitignore b/.gitignore
index 5a6ed48..dade81e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
1.pkg 1Gemfile.lock
2.bundled_gems/
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..96912da
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,30 @@
1source 'https://rubygems.org'
2
3group :development, :test do
4 gem 'puppetlabs_spec_helper', :require => false
5
6 gem 'metadata-json-lint'
7 # This is nice and all, but let's not worry about it until we've actually
8 # got puppet 4.x sorted
9 # gem 'puppet-lint-param-docs'
10 gem 'puppet-lint-absolute_classname-check'
11 gem 'puppet-lint-absolute_template_path'
12 gem 'puppet-lint-trailing_newline-check'
13
14 # Puppet 4.x related lint checks
15 gem 'puppet-lint-unquoted_string-check'
16 gem 'puppet-lint-empty_string-check'
17 gem 'puppet-lint-leading_zero-check'
18 gem 'puppet-lint-variable_contains_upcase'
19 gem 'puppet-lint-spaceship_operator_without_tag-check'
20 gem 'puppet-lint-undef_in_function-check'
21
22 if puppetversion = ENV['PUPPET_GEM_VERSION']
23 gem 'puppet', puppetversion, :require => false
24 else
25 gem 'puppet', '~> 3.0', :require => false
26 end
27
28end
29
30# vim:ft=ruby
diff --git a/manifests/dev.pp b/manifests/dev.pp
index 9373ed7..9632477 100644
--- a/manifests/dev.pp
+++ b/manifests/dev.pp
@@ -12,7 +12,7 @@
12# Sample Usage: 12# Sample Usage:
13# 13#
14class httpd::dev { 14class httpd::dev {
15 include httpd::params 15 include ::httpd::params
16 16
17 package { 'apache_dev_package': 17 package { 'apache_dev_package':
18 ensure => installed, 18 ensure => installed,
diff --git a/manifests/init.pp b/manifests/init.pp
index f2a51dc..5f1449d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -13,7 +13,7 @@
13# Sample Usage: 13# Sample Usage:
14# 14#
15class httpd { 15class httpd {
16 include httpd::params 16 include ::httpd::params
17 17
18 package { 'httpd': 18 package { 'httpd':
19 ensure => installed, 19 ensure => installed,
diff --git a/manifests/mod/python.pp b/manifests/mod/python.pp
index c8c733f..0997887 100644
--- a/manifests/mod/python.pp
+++ b/manifests/mod/python.pp
@@ -12,7 +12,7 @@
12# Sample Usage: 12# Sample Usage:
13# 13#
14class httpd::mod::python { 14class httpd::mod::python {
15 include httpd 15 include ::httpd
16 16
17 package { 'mod_python_package': 17 package { 'mod_python_package':
18 ensure => installed, 18 ensure => installed,
diff --git a/manifests/mod/wsgi.pp b/manifests/mod/wsgi.pp
index 9595d43..fef40e3 100644
--- a/manifests/mod/wsgi.pp
+++ b/manifests/mod/wsgi.pp
@@ -12,7 +12,7 @@
12# Sample Usage: 12# Sample Usage:
13# 13#
14class httpd::mod::wsgi { 14class httpd::mod::wsgi {
15 include httpd 15 include ::httpd
16 16
17 package { 'mod_wsgi_package': 17 package { 'mod_wsgi_package':
18 ensure => installed, 18 ensure => installed,
diff --git a/manifests/params.pp b/manifests/params.pp
index 94378ce..f64def0 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -24,8 +24,8 @@ class httpd::params {
24 $ssl = true 24 $ssl = true
25 $template = 'httpd/vhost-default.conf.erb' 25 $template = 'httpd/vhost-default.conf.erb'
26 $priority = '25' 26 $priority = '25'
27 $servername = '' 27 $servername = undef
28 $serveraliases = '' 28 $serveraliases = undef
29 $auth = false 29 $auth = false
30 $redirect_ssl = false 30 $redirect_ssl = false
31 $options = 'Indexes FollowSymLinks MultiViews' 31 $options = 'Indexes FollowSymLinks MultiViews'
diff --git a/manifests/php.pp b/manifests/php.pp
index ad86f7f..06bee56 100644
--- a/manifests/php.pp
+++ b/manifests/php.pp
@@ -13,7 +13,7 @@
13# Sample Usage: 13# Sample Usage:
14# 14#
15class httpd::php { 15class httpd::php {
16 include httpd::params 16 include ::httpd::params
17 17
18 package { 'apache_php_package': 18 package { 'apache_php_package':
19 ensure => present, 19 ensure => present,
diff --git a/manifests/python.pp b/manifests/python.pp
index 698b2e7..b23f5c3 100644
--- a/manifests/python.pp
+++ b/manifests/python.pp
@@ -13,8 +13,8 @@
13# Sample Usage: 13# Sample Usage:
14# 14#
15class httpd::python { 15class httpd::python {
16 include httpd::params 16 include ::httpd::params
17 include httpd 17 include ::httpd
18 18
19 package { 'apache_python_package': 19 package { 'apache_python_package':
20 ensure => present, 20 ensure => present,
diff --git a/manifests/ssl.pp b/manifests/ssl.pp
index 124d376..e3abc4c 100644
--- a/manifests/ssl.pp
+++ b/manifests/ssl.pp
@@ -14,7 +14,7 @@
14# 14#
15class httpd::ssl { 15class httpd::ssl {
16 16
17 include httpd 17 include ::httpd
18 18
19 case $::operatingsystem { 19 case $::operatingsystem {
20 'centos', 'fedora', 'redhat', 'scientific': { 20 'centos', 'fedora', 'redhat', 'scientific': {
diff --git a/manifests/vhost.pp b/manifests/vhost.pp
index 559a531..16cdd95 100644
--- a/manifests/vhost.pp
+++ b/manifests/vhost.pp
@@ -44,16 +44,16 @@ define httpd::vhost(
44 $vhost_name = $httpd::params::vhost_name 44 $vhost_name = $httpd::params::vhost_name
45 ) { 45 ) {
46 46
47 include httpd 47 include ::httpd
48 48
49 if $servername == '' { 49 if $servername == undef {
50 $srvname = $name 50 $srvname = $name
51 } else { 51 } else {
52 $srvname = $servername 52 $srvname = $servername
53 } 53 }
54 54
55 if $ssl == true { 55 if $ssl == true {
56 include httpd::ssl 56 include ::httpd::ssl
57 } 57 }
58 58
59 # Since the template will use auth, redirect to https requires mod_rewrite 59 # Since the template will use auth, redirect to https requires mod_rewrite
diff --git a/manifests/vhost/proxy.pp b/manifests/vhost/proxy.pp
index 9e44da7..72d091d 100644
--- a/manifests/vhost/proxy.pp
+++ b/manifests/vhost/proxy.pp
@@ -23,24 +23,24 @@ define httpd::vhost::proxy (
23 $dest, 23 $dest,
24 $priority = '10', 24 $priority = '10',
25 $template = 'httpd/vhost-proxy.conf.erb', 25 $template = 'httpd/vhost-proxy.conf.erb',
26 $servername = '', 26 $servername = undef,
27 $serveraliases = '', 27 $serveraliases = undef,
28 $ssl = false, 28 $ssl = false,
29 $vhost_name = '*' 29 $vhost_name = '*'
30 ) { 30 ) {
31 31
32 include httpd 32 include ::httpd
33 33
34 $apache_name = $httpd::params::apache_name 34 $apache_name = $httpd::params::apache_name
35 $ssl_path = $httpd::params::ssl_path 35 $ssl_path = $httpd::params::ssl_path
36 if $servername == '' { 36 if $servername == undef {
37 $srvname = $name 37 $srvname = $name
38 } else { 38 } else {
39 $srvname = $servername 39 $srvname = $servername
40 } 40 }
41 41
42 if $ssl == true { 42 if $ssl == true {
43 include httpd::ssl 43 include ::httpd::ssl
44 } 44 }
45 45
46 file { "${priority}-${name}": 46 file { "${priority}-${name}":
diff --git a/manifests/vhost/redirect.pp b/manifests/vhost/redirect.pp
index 250d42a..589ba6d 100644
--- a/manifests/vhost/redirect.pp
+++ b/manifests/vhost/redirect.pp
@@ -21,12 +21,12 @@ define httpd::vhost::redirect (
21 $port, 21 $port,
22 $dest, 22 $dest,
23 $priority = '10', 23 $priority = '10',
24 $serveraliases = '', 24 $serveraliases = undef,
25 $template = 'httpd/vhost-redirect.conf.erb', 25 $template = 'httpd/vhost-redirect.conf.erb',
26 $vhost_name = '*' 26 $vhost_name = '*'
27 ) { 27 ) {
28 28
29 include httpd 29 include ::httpd
30 30
31 $srvname = $name 31 $srvname = $name
32 32
diff --git a/templates/vhost-default.conf.erb b/templates/vhost-default.conf.erb
index 2cb96d5..e9d2d77 100644
--- a/templates/vhost-default.conf.erb
+++ b/templates/vhost-default.conf.erb
@@ -8,7 +8,7 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
8 ServerName <%= @srvname %> 8 ServerName <%= @srvname %>
9<% if @serveraliases.is_a? Array -%> 9<% if @serveraliases.is_a? Array -%>
10<% @serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%> 10<% @serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%>
11<% elsif @serveraliases != '' -%> 11<% elsif @serveraliases != nil -%>
12<%= " ServerAlias #{@serveraliases}" -%> 12<%= " ServerAlias #{@serveraliases}" -%>
13<% end -%> 13<% end -%>
14 DocumentRoot <%= @docroot %> 14 DocumentRoot <%= @docroot %>
diff --git a/templates/vhost-proxy.conf.erb b/templates/vhost-proxy.conf.erb
index 8635dd5..05c6a8a 100644
--- a/templates/vhost-proxy.conf.erb
+++ b/templates/vhost-proxy.conf.erb
@@ -8,7 +8,7 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
8 ServerName <%= @srvname %> 8 ServerName <%= @srvname %>
9<% if @serveraliases.is_a? Array %> 9<% if @serveraliases.is_a? Array %>
10<% @serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %> 10<% @serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %>
11<% elsif @serveraliases != '' %> 11<% elsif @serveraliases != nil %>
12<%= " ServerAlias #{@serveraliases}" %> 12<%= " ServerAlias #{@serveraliases}" %>
13<% end %> 13<% end %>
14 ProxyRequests Off 14 ProxyRequests Off
diff --git a/templates/vhost-redirect.conf.erb b/templates/vhost-redirect.conf.erb
index 1cd0362..0a97142 100644
--- a/templates/vhost-redirect.conf.erb
+++ b/templates/vhost-redirect.conf.erb
@@ -3,7 +3,7 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
3 ServerName <%= @srvname %> 3 ServerName <%= @srvname %>
4<% if @serveraliases.is_a? Array %> 4<% if @serveraliases.is_a? Array %>
5<% @serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %> 5<% @serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %>
6<% elsif @serveraliases != '' %> 6<% elsif @serveraliases != nil %>
7<%= " ServerAlias #{@serveraliases}" %> 7<%= " ServerAlias #{@serveraliases}" %>
8<% end %> 8<% end %>
9 Redirect / <%= @dest %>/ 9 Redirect / <%= @dest %>/