-
Notifications
You must be signed in to change notification settings - Fork 54
(#351) code_manager: Switch default to undef
#352
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ | |
Hash $pe_conf_data = {}, | ||
|
||
# Code Manager | ||
Optional[Boolean] $code_manager_auto_configure = true, | ||
Optional[Boolean] $code_manager_auto_configure = undef, | ||
Optional[String] $r10k_remote = undef, | ||
Optional[String] $r10k_private_key_file = undef, | ||
Optional[Peadm::Pem] $r10k_private_key_content = undef, | ||
|
@@ -135,6 +135,20 @@ | |
# either be undef or else the key content to write. | ||
$r10k_private_key = peadm::file_or_content('r10k_private_key', $r10k_private_key_file, $r10k_private_key_content) | ||
|
||
# enable code manager if: | ||
# * it isn't explicitly disabled *and* the user provided r10k repo+key | ||
# * a replica is present | ||
# * one or multiple compiler are present | ||
$_code_manager_auto_configure = if $r10k_private_key and $code_manager_auto_configure { | ||
true | ||
} elsif $replica_host { | ||
true | ||
} elsif $compiler_hosts { | ||
true | ||
} else { | ||
$code_manager_auto_configure | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does installation of Larger or XL installations w/ replicas still succeed? If I recall correctly, Code Manager defaults to enabled in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Sharpie is correct! We need code manager for HA environments. There is already a plan for those environments which for any reasons cant use code manager There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. installation with replica and/or compilers still works. In those cases code-manager is configured/enabled |
||
# Process user input for license key (same process as for r10k private key above). | ||
$license_key = peadm::file_or_content('license_key', $license_key_file, $license_key_content) | ||
|
||
|
@@ -174,14 +188,14 @@ | |
'puppet_enterprise::puppet_master_host' => $primary_target.peadm::certname(), | ||
'pe_install::puppet_master_dnsaltnames' => $dns_alt_names, | ||
'puppet_enterprise::puppetdb_database_host' => $primary_postgresql_target.peadm::certname(), | ||
'puppet_enterprise::profile::master::code_manager_auto_configure' => $code_manager_auto_configure, | ||
'puppet_enterprise::profile::master::code_manager_auto_configure' => $_code_manager_auto_configure, | ||
'puppet_enterprise::profile::master::r10k_remote' => $r10k_remote, | ||
'puppet_enterprise::profile::master::r10k_private_key' => $r10k_private_key ? { | ||
undef => undef, | ||
default => '/etc/puppetlabs/puppetserver/ssh/id-control_repo.rsa', | ||
}, | ||
'puppet_enterprise::profile::master::r10k_known_hosts' => $r10k_known_hosts, | ||
} + $puppetdb_database_temp_config + $pe_conf_data) | ||
}.delete_undef_values + $puppetdb_database_temp_config + $pe_conf_data) | ||
|
||
$primary_postgresql_pe_conf = peadm::generate_pe_conf({ | ||
'console_admin_password' => 'not used', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This conditional doesn't account for the case where a user might provide just a remote and not a key, as they would if they were using an HTTPS clone URL for a public repo, which doesn't require any creds or key. Would it make sense to check for the remote to be set here instead of the key, since I think that is the minimum required for Code Manager to work properly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
derp, you're right! I had it the way you described it before and broke it during the latest rebase...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it in #401