From e55f49ba7e304e5927ebd7a363e4e62a027d54d3 Mon Sep 17 00:00:00 2001 From: John Mitsch Date: Fri, 11 Mar 2016 13:27:57 -0500 Subject: [PATCH] Fixes #14188 - change pulp_parent to qpid_client class --- manifests/capsule.pp | 4 +-- manifests/pulp_child.pp | 60 ------------------------------- manifests/pulp_parent.pp | 78 ---------------------------------------- manifests/qpid_client.pp | 44 +++++++++++++++++++++++ 4 files changed, 46 insertions(+), 140 deletions(-) delete mode 100644 manifests/pulp_child.pp delete mode 100644 manifests/pulp_parent.pp create mode 100644 manifests/qpid_client.pp diff --git a/manifests/capsule.pp b/manifests/capsule.pp index 77183bf7..9fd78f67 100644 --- a/manifests/capsule.pp +++ b/manifests/capsule.pp @@ -26,7 +26,7 @@ class { '::certs::apache': hostname => $capsule_fqdn } class { '::certs::qpid': hostname => $capsule_fqdn } class { '::certs::qpid_router': hostname => $capsule_fqdn } - class { '::certs::pulp_child': hostname => $capsule_fqdn } + class { '::certs::qpid_client': hostname => $capsule_fqdn } if $certs_tar { certs::tar_create { $certs_tar: @@ -36,7 +36,7 @@ Class['certs::qpid'], Class['certs::qpid_router'], Class['certs::apache'], - Class['certs::pulp_child']], + Class['certs::qpid_client']], } } } diff --git a/manifests/pulp_child.pp b/manifests/pulp_child.pp deleted file mode 100644 index 0ae95e92..00000000 --- a/manifests/pulp_child.pp +++ /dev/null @@ -1,60 +0,0 @@ -# Pulp Node Certs -class certs::pulp_child ( - $hostname = $::certs::node_fqdn, - $generate = $::certs::generate, - $regenerate = $::certs::regenerate, - $deploy = $::certs::deploy, - ) { - - cert { "${::certs::pulp_child::hostname}-qpid-client-cert": - hostname => $::certs::pulp_child::hostname, - common_name => 'pulp-qpid-client-cert', - purpose => client, - country => $::certs::country, - state => $::certs::state, - city => $::certs::city, - org => 'PULP', - org_unit => $::certs::org_unit, - expiration => $::certs::expiration, - ca => $::certs::default_ca, - generate => $generate, - regenerate => $regenerate, - deploy => $deploy, - password_file => $certs::ca_key_password_file, - } - - if $deploy { - pubkey { $pulp::ca_cert: - key_pair => $::certs::default_ca, - } ~> - - pubkey { $pulp::ssl_ca_cert: - key_pair => $::certs::default_ca, - } - - pubkey { $pulp::child::server_ca_cert: - key_pair => $::certs::server_ca, - } - - pubkey { $pulp::child::ssl_cert: - # Defined in certs::apache module - key_pair => Cert["${hostname}-apache"], - } - - privkey { $pulp::child::ssl_key: - # Defined in certs::apache module - key_pair => Cert["${hostname}-apache"], - } - - Cert["${::certs::pulp_child::hostname}-qpid-client-cert"] ~> - key_bundle { $pulp::messaging_client_cert: - key_pair => Cert["${::certs::pulp_child::hostname}-qpid-client-cert"], - } ~> - file { $pulp::messaging_client_cert: - owner => 'apache', - group => 'apache', - mode => '0640', - } - - } -} diff --git a/manifests/pulp_parent.pp b/manifests/pulp_parent.pp deleted file mode 100644 index 548f8a1b..00000000 --- a/manifests/pulp_parent.pp +++ /dev/null @@ -1,78 +0,0 @@ -# Pulp Master Certs configuration -class certs::pulp_parent ( - - $hostname = $::certs::node_fqdn, - $generate = $::certs::generate, - $regenerate = $::certs::regenerate, - $deploy = $::certs::deploy, - - $nodes_cert_dir = $certs::params::nodes_cert_dir, - $nodes_cert_name = $certs::params::nodes_cert_name, - - $messaging_ca_cert = $certs::ca_cert, - $messaging_client_cert = $certs::params::messaging_client_cert - - ) inherits pulp::params { # lint:ignore:inherits_across_namespaces - - # cert for nodes authenitcation - cert { "${::certs::pulp_parent::hostname}-parent-cert": - hostname => $certs::pulp_parent::hostname, - common_name => 'pulp-child-node-cert', - purpose => client, - country => $::certs::country, - state => $::certs::state, - city => $::certs::city, - org => 'PULP', - org_unit => 'NODES', - expiration => $::certs::expiration, - ca => $::certs::default_ca, - generate => $generate, - regenerate => $regenerate, - deploy => $deploy, - password_file => $certs::ca_key_password_file, - } - - cert { "${::certs::pulp_parent::hostname}-qpid-client-cert": - hostname => $::certs::pulp_parent::hostname, - common_name => 'pulp-qpid-client-cert', - purpose => client, - country => $::certs::country, - state => $::certs::state, - city => $::certs::city, - org => 'PULP', - org_unit => $::certs::org_unit, - expiration => $::certs::expiration, - ca => $::certs::default_ca, - generate => $generate, - regenerate => $regenerate, - deploy => $deploy, - password_file => $certs::ca_key_password_file, - } - - if $deploy { - - Cert["${::certs::pulp_parent::hostname}-parent-cert"] ~> - file { $nodes_cert_dir: - ensure => directory, - owner => $certs::user, - group => $certs::group, - mode => '0755', - require => Package['pulp-server'], - } -> - key_bundle { "${nodes_cert_dir}/${::certs::pulp_parent::nodes_cert_name}": - key_pair => Cert["${::certs::pulp_parent::hostname}-parent-cert"], - } - - Cert["${::certs::pulp_parent::hostname}-qpid-client-cert"] ~> - key_bundle { $messaging_client_cert: - key_pair => Cert["${::certs::pulp_parent::hostname}-qpid-client-cert"], - } ~> - file { $messaging_client_cert: - owner => 'apache', - group => 'apache', - mode => '0640', - } -> Class['pulp::config'] - - } - -} diff --git a/manifests/qpid_client.pp b/manifests/qpid_client.pp new file mode 100644 index 00000000..6287f439 --- /dev/null +++ b/manifests/qpid_client.pp @@ -0,0 +1,44 @@ +# Pulp Master Certs configuration +class certs::qpid_client ( + + $hostname = $::certs::node_fqdn, + $generate = $::certs::generate, + $regenerate = $::certs::regenerate, + $deploy = $::certs::deploy, + + $messaging_client_cert = $certs::params::messaging_client_cert + + ) { + + cert { "${hostname}-qpid-client-cert": + hostname => $hostname, + common_name => 'pulp-qpid-client-cert', + purpose => client, + country => $::certs::country, + state => $::certs::state, + city => $::certs::city, + org => 'PULP', + org_unit => $::certs::org_unit, + expiration => $::certs::expiration, + ca => $::certs::default_ca, + generate => $generate, + regenerate => $regenerate, + deploy => $deploy, + password_file => $certs::ca_key_password_file, + } + + if $deploy { + + Cert["${hostname}-qpid-client-cert"] ~> + key_bundle { $messaging_client_cert: + key_pair => Cert["${hostname}-qpid-client-cert"], + } ~> + file { $messaging_client_cert: + owner => 'apache', + group => 'apache', + mode => '0640', + } + + } + +}