Revision 82a61d51
Added by Ewoud Kohl van Wijngaarden about 9 years ago
manifests/init.pp | ||
---|---|---|
validate_hash($agent_additional_settings)
|
||
validate_hash($server_additional_settings)
|
||
|
||
validate_string($ca_server)
|
||
if $ca_server {
|
||
validate_string($ca_server)
|
||
}
|
||
validate_string($hiera_config)
|
||
validate_string($server_external_nodes)
|
||
validate_string($server_ca_proxy)
|
||
if $server_ca_proxy {
|
||
validate_string($server_ca_proxy)
|
||
}
|
||
if $server_puppetdb_host {
|
||
validate_string($server_puppetdb_host)
|
||
}
|
manifests/params.pp | ||
---|---|---|
$module_repository = undef
|
||
$configtimeout = 120
|
||
$usecacheonfailure = true
|
||
$ca_server = ''
|
||
$ca_server = undef
|
||
$ca_port = undef
|
||
$prerun_command = undef
|
||
$postrun_command = undef
|
||
... | ... | |
$server_enc_api = 'v2'
|
||
$server_report_api = 'v2'
|
||
$server_request_timeout = 60
|
||
$server_ca_proxy = ''
|
||
$server_ca_proxy = undef
|
||
$server_certname = $::clientcert
|
||
$server_strict_variables = false
|
||
$server_rack_arguments = []
|
manifests/server.pp | ||
---|---|---|
if $::puppet::server_git_repo {
|
||
$config_version_cmd = "git --git-dir ${::puppet::server_envs_dir}/\$environment/.git describe --all --long"
|
||
} else {
|
||
$config_version_cmd = ''
|
||
$config_version_cmd = undef
|
||
}
|
||
} else {
|
||
$config_version_cmd = $::puppet::server_config_version
|
manifests/server/passenger.pp | ||
---|---|---|
'unset X-Forwarded-For',
|
||
]
|
||
|
||
if $puppet_ca_proxy != '' {
|
||
if $puppet_ca_proxy and $puppet_ca_proxy != '' {
|
||
include ::apache::mod::proxy
|
||
include ::apache::mod::proxy_http
|
||
|
||
$custom_fragment = "ProxyPassMatch ^/([^/]+/certificate.*)$ ${puppet_ca_proxy}/\$1"
|
||
$ssl_proxyengine = true
|
||
} else {
|
||
$custom_fragment = ''
|
||
$custom_fragment = undef
|
||
$ssl_proxyengine = false
|
||
}
|
||
|
||
$ssl_crl_check = $ssl_ca_crl ? {
|
||
... | ... | |
ssl_verify_client => 'optional',
|
||
ssl_options => '+StdEnvVars +ExportCertData',
|
||
ssl_verify_depth => '1',
|
||
ssl_proxyengine => $puppet_ca_proxy != '',
|
||
ssl_proxyengine => $ssl_proxyengine,
|
||
custom_fragment => $custom_fragment,
|
||
request_headers => $request_headers,
|
||
options => ['None'],
|
spec/classes/puppet_server_config_spec.rb | ||
---|---|---|
should contain_file('/usr/share/puppet/modules').with_ensure('directory')
|
||
|
||
should contain_file('/etc/puppet/manifests/site.pp').with({
|
||
:ensure => 'present',
|
||
:ensure => 'file',
|
||
:replace => false,
|
||
:content => "# site.pp must exist (puppet #15106, foreman #1708)\n",
|
||
})
|
||
... | ... | |
|
||
it 'should configure puppet.conf' do
|
||
should contain_concat_fragment('puppet.conf+30-master').
|
||
with_content(%r{^\s+manifest\s+= /etc/puppet/environments/\$environment/manifests/site.pp\n\s+modulepath\s+= /etc/puppet/environments/\$environment/modules\n\s+config_version\s+= $})
|
||
with_content(%r{^\s+manifest\s+= /etc/puppet/environments/\$environment/manifests/site.pp\n\s+modulepath\s+= /etc/puppet/environments/\$environment/modules$})
|
||
end
|
||
|
||
it { should_not contain_puppet__server__env('development') }
|
spec/defines/puppet_server_env_spec.rb | ||
---|---|---|
without_content(/^\s+manifestdir\s+=/).
|
||
with_content(%r{^\s+modulepath\s+= /etc/puppet/environments/foo/modules:/etc/puppet/environments/common:/etc/puppet/modules:/usr/share/puppet/modules$}).
|
||
without_content(/^\s+templatedir\s+=/).
|
||
with_content(/^\s+config_version\s+=/).
|
||
without_content(/^\s+config_version\s+=/).
|
||
with({}) # So we can use a trailing dot on each with_content line
|
||
|
||
should_not contain_file('/etc/puppet/environments/foo/environment.conf')
|
templates/server/puppet.conf.erb | ||
---|---|---|
( scope.lookupvar("puppet::server_git_repo") || scope.lookupvar("puppet::server_dynamic_environments") ) -%>
|
||
manifest = <%= scope.lookupvar("puppet::server_envs_dir") %>/$environment/manifests/site.pp
|
||
modulepath = <%= scope.lookupvar("puppet::server_envs_dir") %>/$environment/modules
|
||
<% if scope.lookupvar("puppet::server::config_version_cmd") -%>
|
||
config_version = <%= scope.lookupvar("puppet::server::config_version_cmd") %>
|
||
<% end -%>
|
||
<% end -%>
|
||
<% scope.lookupvar("puppet::server_additional_settings").sort_by {|k, v| k}.each do |key, value| -%>
|
||
<%= key %> = <%= value %>
|
||
<% end -%>
|
Also available in: Unified diff
Further lint fixes