Project

General

Profile

« Previous | Next » 

Revision 5f2f0557

Added by Ivan Necas about 10 years ago

Refs #5423 - fix certs generation for capsule usage

Also, disable setting of katello repo for the certs till we support
package uploads again.

View differences:

manifests/capsule.pp
# $parent_fqdn:: fqdn of the parent node. Does not usually
# need to be set.
#
# $child_fqdn:: fqdn of the child node. REQUIRED
# $capsule_fqdn:: fqdn of the capsule. REQUIRED
#
# $certs_tar:: path to tar file with certs to generate
#
# $katello_user:: Katello username used for creating repo with certs.
# This param indicates that we want to distribute the certs via
# Katello repo
#
# $katello_password:: Katello password
#
# $katello_org:: Organization name to create a repository in
#
# $katello_repo_provider:: Provider name to create a repository in
#
# $katello_product:: Product name to create a repository in
#
# $katello_activation_key:: Activation key that registers the system
# with access to the cert repo (OPTIONAL)
#
class certs::capsule (
$parent_fqdn = $fqdn,
$child_fqdn = $certs::params::node_fqdn,
$certs_tar = $certs::params::certs_tar,
$katello_user = $certs::params::katello_user,
$katello_password = $certs::params::katello_password,
$katello_org = $certs::params::katello_org,
$katello_repo_provider = $certs::params::katello_repo_provider,
$katello_product = $certs::params::katello_product,
$katello_activation_key = $certs::params::katello_activation_key
$parent_fqdn = $fqdn,
$capsule_fqdn = $certs::node_fqdn,
$certs_tar = $certs::params::certs_tar
) inherits certs::params {
validate_present($child_fqdn)
validate_present($capsule_fqdn)
class { 'certs::puppet': }
class { 'certs::foreman_proxy': }
class { 'certs::apache': }
class { 'certs::pulp_child': }
class { 'certs::puppet': hostname => $capsule_fqdn }
class { 'certs::foreman': hostname => $capsule_fqdn }
class { 'certs::foreman_proxy': hostname => $capsule_fqdn }
class { 'certs::apache': hostname => $capsule_fqdn }
class { 'certs::pulp_child': hostname => $capsule_fqdn }
class { 'certs::pulp_parent':
hostname => $parent_fqdn,
deploy => true,
......
Class['certs::pulp_child']]
}
}
if $katello_user {
katello_repo { $child_fqdn:
user => $katello_user,
password => $katello_password,
org => $katello_org,
repo_provider => $katello_repo_provider,
product => $katello_product,
package_files => ['/root/ssl-build/*.noarch.rpm',
"/root/ssl-build/${child_fqdn}/*.noarch.rpm"],
subscribe => [Class['certs::puppet'],
Class['certs::foreman'],
Class['certs::foreman_proxy'],
Class['certs::apache'],
Class['certs::pulp_child']],
}
if $katello_activation_key {
katello_activation_key { $katello_activation_key:
user => $katello_user,
password => $katello_password,
org => $katello_org,
product => $katello_product,
require => Katello_repo[$child_fqdn]
}
}
}
}

Also available in: Unified diff