Revision 3c974f0c
Added by Stephen Benjamin over 8 years ago
manifests/init.pp | ||
---|---|---|
# $log_to_syslog:: Log to syslog or not
|
||
# type:boolean
|
||
#
|
||
# $interface:: Interface to listen on
|
||
#
|
||
# $ssl:: Use SSL with Qpid
|
||
# type:boolean
|
||
#
|
||
... | ... | |
$config_file = $qpid::params::config_file,
|
||
$log_level = $qpid::params::log_level,
|
||
$log_to_syslog = $qpid::params::log_to_syslog,
|
||
$interface = $qpid::params::interface,
|
||
$ssl = $qpid::params::ssl,
|
||
$ssl_port = $qpid::params::ssl_port,
|
||
$ssl_cert_db = $qpid::params::ssl_cert_db,
|
manifests/params.pp | ||
---|---|---|
$log_level = 'error+'
|
||
$log_to_syslog = true
|
||
|
||
$interface = undef
|
||
|
||
$ssl = false
|
||
$ssl_port = 5671
|
||
$ssl_cert_db = undef
|
spec/classes/qpid_config_spec.rb | ||
---|---|---|
'auth=no'
|
||
]
|
||
end
|
||
end
|
||
|
||
context 'with ssl options' do
|
||
let :pre_condition do
|
||
'class {"qpid":
|
||
ssl => true,
|
||
ssl_port => 5671,
|
||
ssl_cert_db => "/etc/pki/katello/nssdb",
|
||
ssl_cert_password_file => "/etc/pki/katello/nssdb/nss_db_password-file",
|
||
ssl_cert_name => "broker",
|
||
ssl_require_client_auth => true
|
||
}'
|
||
end
|
||
context 'with interface' do
|
||
let :pre_condition do
|
||
'class {"qpid":
|
||
interface => "lo",
|
||
}'
|
||
end
|
||
|
||
it 'should create configuration file' do
|
||
content = catalogue.resource('file', '/etc/qpid/qpidd.conf').send(:parameters)[:content]
|
||
content.split("\n").reject { |c| c =~ /(^#|^$)/ }.should == [
|
||
'log-enable=error+',
|
||
'log-to-syslog=yes',
|
||
'auth=no',
|
||
'require-encryption=yes',
|
||
'ssl-require-client-authentication=yes',
|
||
'ssl-port=5671',
|
||
'ssl-cert-db=/etc/pki/katello/nssdb',
|
||
'ssl-cert-password-file=/etc/pki/katello/nssdb/nss_db_password-file',
|
||
'ssl-cert-name=broker'
|
||
]
|
||
end
|
||
it 'should create configuration file' do
|
||
content = catalogue.resource('file', '/etc/qpid/qpidd.conf').send(:parameters)[:content]
|
||
content.split("\n").reject { |c| c =~ /(^#|^$)/ }.should == [
|
||
'log-enable=error+',
|
||
'log-to-syslog=yes',
|
||
'auth=no',
|
||
'interface=lo'
|
||
]
|
||
end
|
||
end
|
||
|
||
context 'with ssl options' do
|
||
let :pre_condition do
|
||
'class {"qpid":
|
||
ssl => true,
|
||
ssl_port => 5671,
|
||
ssl_cert_db => "/etc/pki/katello/nssdb",
|
||
ssl_cert_password_file => "/etc/pki/katello/nssdb/nss_db_password-file",
|
||
ssl_cert_name => "broker",
|
||
ssl_require_client_auth => true
|
||
}'
|
||
end
|
||
|
||
it 'should create configuration file' do
|
||
content = catalogue.resource('file', '/etc/qpid/qpidd.conf').send(:parameters)[:content]
|
||
content.split("\n").reject { |c| c =~ /(^#|^$)/ }.should == [
|
||
'log-enable=error+',
|
||
'log-to-syslog=yes',
|
||
'auth=no',
|
||
'require-encryption=yes',
|
||
'ssl-require-client-authentication=yes',
|
||
'ssl-port=5671',
|
||
'ssl-cert-db=/etc/pki/katello/nssdb',
|
||
'ssl-cert-password-file=/etc/pki/katello/nssdb/nss_db_password-file',
|
||
'ssl-cert-name=broker'
|
||
]
|
||
end
|
||
end
|
||
end
|
templates/qpidd.conf.erb | ||
---|---|---|
ssl-cert-password-file=<%= scope.lookupvar("qpid::ssl_cert_password_file") %>
|
||
ssl-cert-name=<%= scope.lookupvar("qpid::ssl_cert_name") %>
|
||
<% end %>
|
||
|
||
<% unless [nil, :undefined, :undef, ''].include?(scope.lookupvar("qpid::interface")) -%>
|
||
interface=<%= scope.lookupvar("qpid::interface") %>
|
||
<% end %>
|
Also available in: Unified diff
refs #11737 - support listening on a particular interface