Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive $pulp_master variable #217

Merged
merged 2 commits into from
Nov 25, 2019
Merged
Show file tree
Hide file tree
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
17 changes: 7 additions & 10 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#
# $puppet:: Enable puppet
#
# $pulp_master:: Whether the foreman_proxy_content should be identified as a pulp master server
#
# $pulp_admin_password:: Password for the Pulp admin user. It should be left blank so that a random password is generated
#
# $pulp_max_speed:: The maximum download speed per second for a Pulp task, such as a sync. (e.g. "4 Kb" (Uses SI KB), 4MB, or 1GB" )
Expand Down Expand Up @@ -90,7 +88,6 @@
#
class foreman_proxy_content (
String[1] $parent_fqdn = $foreman_proxy_content::params::parent_fqdn,
Boolean $pulp_master = $foreman_proxy_content::params::pulp_master,
String $pulp_admin_password = $foreman_proxy_content::params::pulp_admin_password,
Optional[String] $pulp_max_speed = $foreman_proxy_content::params::pulp_max_speed,
Optional[Integer[1]] $pulp_num_workers = $foreman_proxy_content::params::pulp_num_workers,
Expand Down Expand Up @@ -139,6 +136,7 @@
include foreman_proxy
include foreman_proxy::plugin::pulp

$pulp_master = $foreman_proxy::plugin::pulp::enabled
$pulp = $foreman_proxy::plugin::pulp::pulpnode_enabled

$foreman_proxy_fqdn = $facts['fqdn']
Expand All @@ -165,26 +163,25 @@
require => Class['certs'],
}

if $pulp or $reverse_proxy_real {
if $pulp_master or $reverse_proxy_real {
class { 'certs::apache':
hostname => $foreman_proxy_fqdn,
require => Class['certs'],
}
~> class { 'foreman_proxy_content::reverse_proxy':
}

if $reverse_proxy_real {
class { 'foreman_proxy_content::reverse_proxy':
path => '/',
url => "${foreman_url}/",
servername => $foreman_proxy_fqdn,
port => $reverse_proxy_port,
subscribe => Class['certs::foreman_proxy'],
ssl_protocol => $ssl_protocol,
}
}

if $pulp_master or $pulp {
if $qpid_router {
class { 'foreman_proxy_content::dispatch_router':
require => Class['pulp'],
}
contain foreman_proxy_content::dispatch_router
}

class { 'pulp::crane':
Expand Down
1 change: 0 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

$puppet = true

$pulp_master = false
$pulp_admin_password = extlib::cache_data('foreman_cache_data', 'pulp_node_admin_password', extlib::random_password(32))
$pulp_max_speed = undef
$pulp_num_workers = undef
Expand Down
1 change: 1 addition & 0 deletions spec/classes/foreman_proxy_content_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<<-PUPPET
include foreman_proxy
class { 'foreman_proxy::plugin::pulp':
enabled => false,
pulpnode_enabled => true,
}
PUPPET
Expand Down