-
Notifications
You must be signed in to change notification settings - Fork 239
Conditionally generate the CA cert. #783
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
base: master
Are you sure you want to change the base?
Changes from all commits
7c892c5
a86918f
4fc67ad
bdbc335
0683084
5e43474
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 |
---|---|---|
|
@@ -157,22 +157,24 @@ | |
|
||
# Generate a new CA and host cert if our host cert doesn't exist | ||
if $puppet::server::ca { | ||
if versioncmp($::puppetversion, '6.0') > 0 { | ||
$creates = $puppet::server::ssl_ca_cert | ||
$command = "${puppet::puppetserver_cmd} ca setup" | ||
} else { | ||
$creates = $puppet::server::ssl_cert | ||
$command = "${puppet::puppet_cmd} cert --generate ${puppet::server::certname} --allow-dns-alt-names" | ||
} | ||
if $puppet::generate_ca_cert { | ||
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. I think you can move this up a bit so it also captures the 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. ok, will do. |
||
if versioncmp($::puppetversion, '6.0') > 0 { | ||
$creates = $puppet::server::ssl_ca_cert | ||
$command = "${puppet::puppetserver_cmd} ca setup" | ||
} else { | ||
$creates = $puppet::server::ssl_cert | ||
$command = "${puppet::puppet_cmd} cert --generate ${puppet::server::certname} --allow-dns-alt-names" | ||
} | ||
|
||
exec {'puppet_server_config-generate_ca_cert': | ||
creates => $creates, | ||
command => $command, | ||
umask => '0022', | ||
require => [ | ||
Concat["${puppet::server::dir}/puppet.conf"], | ||
Exec['puppet_server_config-create_ssl_dir'], | ||
], | ||
exec {'puppet_server_config-generate_ca_cert': | ||
creates => $creates, | ||
command => $command, | ||
umask => '0022', | ||
require => [ | ||
Concat["${puppet::server::dir}/puppet.conf"], | ||
Exec['puppet_server_config-create_ssl_dir'], | ||
], | ||
} | ||
} | ||
} elsif $puppet::server::ca_crl_sync { | ||
# If not a ca AND sync the crl from the ca master | ||
|
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.
@ekohl I followed your suggestion. However, if this is the case, shouldn't there just be a $ca in the manifests/init.pp? There is no $ca option in manifests/init.pp now.
I just need this turned off so this module can complete doing its thing without failing about preexisting certs.
Uh oh!
There was an error while loading. Please reload this page.
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.
We do have
$server_ca
ininit.pp
We have a
creates
. Why isn't it picking that up?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.
Hi @ekohl ,
You must be referring to this. I did see this, but this parameter has no effect on whether to generate a CA file.
Where in the code is this? I did not find a
creates
parameter in the init.pp.