Merge "Add Gemfile and puppet 4 checks"
This commit is contained in:
commit
4ab3347998
|
@ -0,0 +1,2 @@
|
|||
Gemfile.lock
|
||||
.bundled_gems/
|
|
@ -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
|
|
@ -17,15 +17,15 @@
|
|||
class cgit(
|
||||
$vhost_name = $::fqdn,
|
||||
$serveradmin = "webmaster@${::fqdn}",
|
||||
$serveraliases = '',
|
||||
$serveraliases = undef,
|
||||
$cgitdir = '/var/www/cgit',
|
||||
$staticfiles = '/var/www/cgit/static',
|
||||
$ssl_cert_file = '',
|
||||
$ssl_key_file = '',
|
||||
$ssl_chain_file = '',
|
||||
$ssl_cert_file_contents = '', # If left empty puppet will not create file.
|
||||
$ssl_key_file_contents = '', # If left empty puppet will not create file.
|
||||
$ssl_chain_file_contents = '', # If left empty puppet will not create file.
|
||||
$ssl_cert_file = undef,
|
||||
$ssl_key_file = undef,
|
||||
$ssl_chain_file = undef,
|
||||
$ssl_cert_file_contents = undef, # If left undefined puppet will not create file.
|
||||
$ssl_key_file_contents = undef, # If left undefined puppet will not create file.
|
||||
$ssl_chain_file_contents = undef, # If left undefined puppet will not create file.
|
||||
$behind_proxy = false,
|
||||
$cgit_timeout = false,
|
||||
$manage_cgitrc = false,
|
||||
|
@ -92,7 +92,7 @@ class cgit(
|
|||
include ::httpd
|
||||
|
||||
if ($::osfamily == 'RedHat') {
|
||||
include cgit::selinux
|
||||
include ::cgit::selinux
|
||||
}
|
||||
|
||||
package { [
|
||||
|
@ -195,7 +195,7 @@ class cgit(
|
|||
subscribe => File['/etc/init.d/git-daemon'],
|
||||
}
|
||||
|
||||
if $ssl_cert_file_contents != '' {
|
||||
if $ssl_cert_file_contents != undef {
|
||||
file { $ssl_cert_file:
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
|
@ -205,7 +205,7 @@ class cgit(
|
|||
}
|
||||
}
|
||||
|
||||
if $ssl_key_file_contents != '' {
|
||||
if $ssl_key_file_contents != undef {
|
||||
file { $ssl_key_file:
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
|
@ -215,7 +215,7 @@ class cgit(
|
|||
}
|
||||
}
|
||||
|
||||
if $ssl_chain_file_contents != '' {
|
||||
if $ssl_chain_file_contents != undef {
|
||||
file { $ssl_chain_file:
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
|
|
|
@ -35,7 +35,7 @@ class cgit::lb (
|
|||
ensure => present,
|
||||
}
|
||||
|
||||
class { 'haproxy':
|
||||
class { '::haproxy':
|
||||
enable => true,
|
||||
global_options => {
|
||||
'log' => '127.0.0.1 local0',
|
||||
|
|
|
@ -68,7 +68,10 @@
|
|||
|
||||
SSLCertificateFile <%= scope.lookupvar("cgit::ssl_cert_file") %>
|
||||
SSLCertificateKeyFile <%= scope.lookupvar("cgit::ssl_key_file") %>
|
||||
<% if scope.lookupvar("cgit::ssl_chain_file") != "" %>
|
||||
<%# The original default was '' -%>
|
||||
<%# scope.lookupvar returns nil for an undefined variable in puppet 4 -%>
|
||||
<%# scope.lookupvar returns :undef for an undefined variable in puppet 3 -%>
|
||||
<% unless ['', nil, :undef].include?(scope.lookupvar("cgit::ssl_chain_file")) %>
|
||||
SSLCertificateChainFile <%= scope.lookupvar("cgit::ssl_chain_file") %>
|
||||
<% end %>
|
||||
</VirtualHost>
|
||||
|
|
Loading…
Reference in New Issue