Skip to content

Commit

Permalink
Simplify variable access (#165)
Browse files Browse the repository at this point in the history
This should effectively be no change.
  • Loading branch information
ekohl authored Aug 30, 2017
1 parent 95136ba commit 435754e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifests/katello.pp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# katello-default-ca is needed for the katello-agent to work properly
# (especially in the custom certs scenario)
files => ["${katello_rhsm_setup_script_location}:755=${katello_www_pub_dir}/${katello_rhsm_setup_script}"],
bootstrap_script => inline_template('/bin/bash <%= @katello_rhsm_setup_script_location %>'),
bootstrap_script => "/bin/bash ${katello_rhsm_setup_script_location}",
postun_script => 'test -f /etc/rhsm/rhsm.conf.kat-backup && command cp /etc/rhsm/rhsm.conf.kat-backup /etc/rhsm/rhsm.conf',
alias => $candlepin_cert_rpm_alias,
subscribe => $server_ca,
Expand Down
2 changes: 1 addition & 1 deletion manifests/qpid.pp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
client_cert => $ca_cert,
trustargs => 'TCu,Cu,Tuw',
refreshonly => true,
subscribe => Pubkey[$::certs::ca_cert],
subscribe => Pubkey[$ca_cert],
} ~>
certs::ssltools::certutil { 'broker':
nss_db_dir => $nss_db_dir,
Expand Down
15 changes: 12 additions & 3 deletions spec/classes/certs_katello_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,18 @@
"class {'certs': pki_dir => '/tmp', server_ca_name => 'server_ca', default_ca_name => 'default_ca'}"
end

describe 'with katello certs set' do
# source format should be -> "${certs::pki_dir}/certs/${server_ca_name}.crt"
it { should contain_trusted_ca__ca('katello_server-host-cert').with({ :source => "/tmp/certs/server_ca.crt" }) }
it { should contain_trusted_ca__ca('katello_server-host-cert').with_source('/tmp/certs/server_ca.crt') }

it do
should contain_certs_bootstrap_rpm('katello-ca-consumer-foo.example.com')
.with_dir('/var/www/html/pub')
.with_summary('Subscription-manager consumer certificate for Katello instance foo.example.com')
.with_description('Consumer certificate and post installation script that configures rhsm.')
.with_files(['/usr/bin/katello-rhsm-consumer:755=/var/www/html/pub/katello-rhsm-consumer'])
.with_bootstrap_script('/bin/bash /usr/bin/katello-rhsm-consumer')
.with_postun_script('test -f /etc/rhsm/rhsm.conf.kat-backup && command cp /etc/rhsm/rhsm.conf.kat-backup /etc/rhsm/rhsm.conf')
.with_alias('katello-ca-consumer-latest.noarch.rpm')
.that_subscribes_to(['Ca[server_ca]', 'Certs::Rhsm_reconfigure_script[/var/www/html/pub/katello-rhsm-consumer]'])
end
end
end

0 comments on commit 435754e

Please sign in to comment.