From 1b761b61c88673bdcc88495df42c748843903ddd Mon Sep 17 00:00:00 2001 From: Dustin Tsang Date: Thu, 2 Oct 2014 20:13:59 -0400 Subject: [PATCH] Fixes #7802 - allow user to be passed into qpid module --- manifests/init.pp | 5 +++-- manifests/qpid.pp | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index d09d94a2..21e29e47 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -96,8 +96,9 @@ } ~> class { 'qpid::client': } ~> class { 'katello::qpid': - client_cert => $certs::qpid::client_cert, - client_key => $certs::qpid::client_key, + client_cert => $certs::qpid::client_cert, + client_key => $certs::qpid::client_key, + katello_user => $katello::user, } ~> class{ 'elasticsearch': } ~> Exec['foreman-rake-db:seed'] diff --git a/manifests/qpid.pp b/manifests/qpid.pp index 769d2957..3215b1e2 100644 --- a/manifests/qpid.pp +++ b/manifests/qpid.pp @@ -2,9 +2,13 @@ class katello::qpid ( $client_cert = undef, $client_key = undef, + $katello_user = undef ){ - - User<|title == $katello::user|>{groups +> $certs::qpidd_group} + if $katello_user == undef { + fail('katello_user not defined') + } else { + User<|title == $katello_user|>{groups +> $certs::qpidd_group} + } 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}",