-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #17366 - change references from capsule to foreman_proxy_content
- Loading branch information
Showing
4 changed files
with
59 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
Rakefile: | ||
param_docs_pattern: | ||
- manifests/capsule.pp | ||
- manifests/foreman_proxy_content.pp | ||
- manifests/init.pp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Prepare the certificates for the node from the parent node | ||
# | ||
# === Parameters: | ||
# | ||
# $parent_fqdn:: fqdn of the parent node. Does not usually | ||
# need to be set. | ||
# | ||
# $foreman_proxy_fqdn:: fqdn of the foreman proxy. REQUIRED | ||
# | ||
# $certs_tar:: path to tar file with certs to generate. REQUIRED | ||
# | ||
class certs::foreman_proxy_content ( | ||
$parent_fqdn = $fqdn, | ||
$foreman_proxy_fqdn = $certs::node_fqdn, | ||
$certs_tar = $certs::params::certs_tar | ||
) inherits certs::params { | ||
|
||
# until we support again pushing the cert rpms to the Katello, | ||
# make sure the certs_tar path is present | ||
validate_present($certs_tar) | ||
validate_present($foreman_proxy_fqdn) | ||
|
||
class { '::certs::puppet': hostname => $foreman_proxy_fqdn } | ||
class { '::certs::foreman': hostname => $foreman_proxy_fqdn } | ||
class { '::certs::foreman_proxy': hostname => $foreman_proxy_fqdn } | ||
class { '::certs::apache': hostname => $foreman_proxy_fqdn } | ||
class { '::certs::qpid': hostname => $foreman_proxy_fqdn } | ||
class { '::certs::qpid_router': hostname => $foreman_proxy_fqdn } | ||
class { '::certs::qpid_client': hostname => $foreman_proxy_fqdn } | ||
|
||
if $certs_tar { | ||
certs::tar_create { $certs_tar: | ||
subscribe => [Class['certs::puppet'], | ||
Class['certs::foreman'], | ||
Class['certs::foreman_proxy'], | ||
Class['certs::qpid'], | ||
Class['certs::qpid_router'], | ||
Class['certs::apache'], | ||
Class['certs::qpid_client']], | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
# Definition: certs::tar_create | ||
# Define: certs::tar_create | ||
# | ||
# This class creates a tar ball of generated SSL certs | ||
# This define creates a tar ball of generated SSL certs | ||
# | ||
# Parameters: | ||
# - The $path of files to tar up | ||
# - The $capsule_fqdn | ||
# === Parameters | ||
# | ||
# Actions: | ||
# - Create a tarball of SSL certs | ||
# $path:: The $path of files to tar | ||
# | ||
# Requires: | ||
# - The certs class | ||
# $foreman_proxy_fqdn:: FQDN of the foreman proxy | ||
# | ||
define certs::tar_create($path = $title, $capsule_fqdn = $::certs::capsule::capsule_fqdn) { | ||
exec { "generate ${path}": | ||
cwd => '/root', | ||
path => ['/usr/bin', '/bin'], | ||
command => "tar -czf ${path} ssl-build/*.noarch.rpm ssl-build/${capsule_fqdn}/*.noarch.rpm", | ||
} | ||
define certs::tar_create( | ||
$path = $title, | ||
$foreman_proxy_fqdn = $::certs::foreman_proxy_content::foreman_proxy_fqdn, | ||
) { | ||
|
||
exec { "generate ${path}": | ||
cwd => '/root', | ||
path => ['/usr/bin', '/bin'], | ||
command => "tar -czf ${path} ssl-build/*.noarch.rpm ssl-build/${foreman_proxy_fqdn}/*.noarch.rpm", | ||
} | ||
} |