Make cadir a configurable parameter#974
Conversation
|
I wasn't 100% sure if |
Prior to this commit, the cadir setting was a hardcoded variable set to
"${puppetserver_dir}/ca". This created an issue when using a
non-standard cadir, such as in issue theforeman#942.
ekohl
left a comment
There was a problem hiding this comment.
The server section is IMHO the right place.
| Optional[Stdlib::Absolutepath] $puppetserver_rundir = $puppet::server_puppetserver_rundir, | ||
| Optional[Stdlib::Absolutepath] $puppetserver_logdir = $puppet::server_puppetserver_logdir, | ||
| Stdlib::Absolutepath $puppetserver_dir = $puppet::server_puppetserver_dir, | ||
| Stdlib::Absolutepath $ca_dir = $puppet::server_ca_dir, |
There was a problem hiding this comment.
How about making ca_dir an optional parameter and later rely on puppetserver_dir by using pick()?
$cadir = pick($ca_dir, "${puppetserver_dir}/ca")That way users can change the puppetserver_dir easily and move the CA directory with it.
There was a problem hiding this comment.
I also like that when we add the needed check for undef in manifests/server/config.pp
if $puppet::server::ca and $puppet::server::ca_dir
that this will not add a redundant entry for cadir in puppet.conf when using the default value, which could be an unexpected change for someone using the default.
There was a problem hiding this comment.
Got the tests passing, let me know if there's anything else @ekohl
Prior to this commit, the cadir setting was a hardcoded variable set to "${puppetserver_dir}/ca". This created an issue when using a non-standard cadir, such as in issue #942.