-
Notifications
You must be signed in to change notification settings - Fork 229
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
Conditionally generate the CA cert. #783
base: master
Are you sure you want to change the base?
Changes from 2 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 | ||
---|---|---|---|---|
|
@@ -462,7 +462,7 @@ | |||
# | ||||
# $server_puppetserver_experimental:: For Puppetserver 5, enable the /puppet/experimental route? Defaults to true | ||||
# | ||||
# $server_puppetserver_auth_template:: Template for generating /etc/puppetlabs/puppetserver/conf.d/auth.conf | ||||
# $server_puppetserver_auth_template:: Template for generating /etc/puppetlabs/puppetserver/conf.d/auth.conf | ||||
# | ||||
# $server_puppetserver_trusted_agents:: Certificate names of puppet agents that are allowed to fetch *all* catalogs | ||||
# Defaults to [] and all agents are only allowed to fetch their own catalogs. | ||||
|
@@ -536,6 +536,8 @@ | |||
# invokes when on static_file_content requests. | ||||
# Defaults to undef | ||||
# | ||||
# $generate_ca_cert:: Defaults to true. When true, the a ca cert is generated. | ||||
# | ||||
# === Usage: | ||||
# | ||||
# * Simple usage: | ||||
|
@@ -734,6 +736,8 @@ | |||
Optional[Integer[1]] $server_max_open_files = $puppet::params::server_max_open_files, | ||||
Optional[Stdlib::Absolutepath] $server_versioned_code_id = undef, | ||||
Optional[Stdlib::Absolutepath] $server_versioned_code_content = undef, | ||||
Boolean $generate_ca_cert = $puppet::params::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.
Suggested change
|
||||
) inherits puppet::params { | ||||
contain puppet::config | ||||
|
||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,15 +164,16 @@ | |
$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'], | ||
], | ||
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. |
||
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.
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.
Will do.