Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
if ($manage_default_ca_cert) and ($facts['os']['family'] == 'RedHat') {
exec { 'download_install_katello_cert_rpm':
path => ['/usr/bin', '/bin',],
command => "curl -k -o /tmp/katello-ca-consumer-latest.noarch.rpm ${satellite_url}/pub/katello-ca-consumer-latest.noarch.rpm && yum -y install /tmp/katello-ca-consumer-latest.noarch.rpm", # rubocop:disable Layout/LineLength
command => ['curl', '-k', '-o', '/tmp/katello-ca-consumer-latest.noarch.rpm', "${satellite_url}/pub/katello-ca-consumer-latest.noarch.rpm", '&&', 'yum', '-y', 'install', '/tmp/katello-ca-consumer-latest.noarch.rpm'], # rubocop:disable Layout/LineLength
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't valid because it uses shell (see the &&). It can't be safely done this way.

You can split it in a file resource with ${satellite_url}/pub/katello-ca-consumer-latest.noarch.rpm" as the source and then notify a package resource, but you'll always have some intermediate file on disk.

creates => '/etc/rhsm/ca/katello-server-ca.pem',
}

Expand Down