Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Fixes #7802 - fixes katello-devel user missing from qpidd group #133

Merged
merged 1 commit into from Oct 27, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions modules/katello/manifests/qpid.pp
Expand Up @@ -2,12 +2,13 @@
class katello::qpid (
$client_cert = undef,
$client_key = undef,
$katello_user = undef
$katello_user = $katello::user
){
if $katello_user == undef {
fail('katello_user not defined')
} else {
User<|title == $katello_user|>{groups +> $certs::qpidd_group}
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",
Expand Down
23 changes: 22 additions & 1 deletion modules/katello/spec/classes/katello_spec.rb
@@ -1,8 +1,10 @@
require 'spec_helper'

describe 'katello' do

context 'on redhat' do
let(:params) do
{:user => 'foreman'}
end
let :facts do
{
:concat_basedir => '/tmp',
Expand All @@ -17,6 +19,25 @@
['include foreman','include certs']
end

it { should contain_class('katello::install') }
it { should contain_class('katello::config') }
it { should contain_class('katello::service') }
end
context 'on oel' do
let :facts do
{
:concat_basedir => '/tmp',
:operatingsystem => 'OracleLinux',
:operatingsystemrelease => '6.5',
:operatingsystemmajrelease => '6.5',
:osfamily => 'RedHat',
}
end

let(:pre_condition) do
['include foreman','include certs']
end

it { should contain_class('katello::install') }
it { should contain_class('katello::config') }
it { should contain_class('katello::service') }
Expand Down
12 changes: 6 additions & 6 deletions modules/katello_devel/manifests/init.pp
Expand Up @@ -105,12 +105,6 @@

Class['certs'] ~>
Class['certs::qpid'] ~>
class { 'qpid::client': } ~>
class { 'katello::qpid':
client_cert => $certs::qpid::client_cert,
client_key => $certs::qpid::client_key,
katello_user => $user
} ~>
class { 'certs::pulp_parent': } ~>
class { 'pulp':
oauth_key => $katello_devel::oauth_key,
Expand All @@ -124,6 +118,12 @@
consumers_ca_key => $certs::ca_key,
consumers_crl => $candlepin::crl_file,
} ~>
class { 'qpid::client': } ~>
class { 'katello::qpid':
client_cert => $certs::qpid::client_cert,
client_key => $certs::qpid::client_key,
katello_user => $user
} ~>
class { 'crane':
cert => $certs::ca_cert,
key => $certs::ca_key,
Expand Down
5 changes: 4 additions & 1 deletion modules/qpid/manifests/config.pp
Expand Up @@ -4,7 +4,10 @@
#
class qpid::config {

user { 'qpidd':
group { $qpid::group:
ensure => present
} ->
user { $qpid::user:
ensure => present,
groups => [$qpid::user_groups],
}
Expand Down
3 changes: 3 additions & 0 deletions modules/qpid/manifests/params.pp
Expand Up @@ -9,4 +9,7 @@

$user_groups = []

$user = 'qpidd'
$group = 'qpidd'

}