diff --git a/manifests/init.pp b/manifests/init.pp index 3035ba45..b568da1f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -139,9 +139,8 @@ ssl_cert_password_file => $certs::qpid::nss_db_password_file, } ~> class { '::katello::qpid': - client_cert => $certs::qpid::client_cert, - client_key => $certs::qpid::client_key, - katello_user => $katello::user, + client_cert => $certs::qpid::client_cert, + client_key => $certs::qpid::client_key, } ~> Exec['foreman-rake-db:seed'] diff --git a/manifests/qpid.pp b/manifests/qpid.pp index 99d85c6d..2c564f89 100644 --- a/manifests/qpid.pp +++ b/manifests/qpid.pp @@ -1,8 +1,9 @@ -# Katello Config +# Katello qpid Config class katello::qpid ( - $client_cert = undef, - $client_key = undef, - $katello_user = $katello::user + $client_cert, + $client_key, + $katello_user = $::katello::user, + $candlepin_event_queue = $::katello::candlepin_event_queue, ){ if $katello_user == undef { fail('katello_user not defined') @@ -10,16 +11,16 @@ Group['qpidd'] -> User<|title == $katello_user|>{groups +> 'qpidd'} } - exec { 'create katello entitlments queue': - command => "qpid-config --ssl-certificate ${katello::qpid::client_cert} --ssl-key ${katello::qpid::client_key} -b 'amqps://${::fqdn}:5671' add queue ${katello::params::candlepin_event_queue} --durable", - unless => "qpid-config --ssl-certificate ${katello::qpid::client_cert} --ssl-key ${katello::qpid::client_key} -b 'amqps://${::fqdn}:5671' queues ${katello::params::candlepin_event_queue}", + exec { 'create katello entitlements queue': + command => "qpid-config --ssl-certificate ${client_cert} --ssl-key ${client_key} -b 'amqps://${::fqdn}:5671' add queue ${candlepin_event_queue} --durable", + unless => "qpid-config --ssl-certificate ${client_cert} --ssl-key ${client_key} -b 'amqps://${::fqdn}:5671' queues ${candlepin_event_queue}", path => '/usr/bin', require => Service['qpidd'], logoutput => true, } - exec { 'bind katello entitlments queue to qpid exchange messages that deal with entitlements': - command => "qpid-config --ssl-certificate ${katello::qpid::client_cert} --ssl-key ${katello::qpid::client_key} -b 'amqps://${::fqdn}:5671' bind event ${katello::params::candlepin_event_queue} '*.*'", - onlyif => "qpid-config --ssl-certificate ${katello::qpid::client_cert} --ssl-key ${katello::qpid::client_key} -b 'amqps://${::fqdn}:5671' queues ${katello::params::candlepin_event_queue}", + exec { 'bind katello entitlements queue to qpid exchange messages that deal with entitlements': + command => "qpid-config --ssl-certificate ${client_cert} --ssl-key ${client_key} -b 'amqps://${::fqdn}:5671' bind event ${candlepin_event_queue} '*.*'", + onlyif => "qpid-config --ssl-certificate ${client_cert} --ssl-key ${client_key} -b 'amqps://${::fqdn}:5671' queues ${candlepin_event_queue}", path => '/usr/bin', require => Service['qpidd'], logoutput => true,