Batch puppet config#144
Open
MirandaStreeter wants to merge 5 commits into
Open
Conversation
Signed-off-by: Miranda Streeter <miranda@mirandastreeter.com>
Signed-off-by: Miranda Streeter <miranda@mirandastreeter.com>
rwaffen
previously approved these changes
Jun 18, 2026
rwaffen
left a comment
Member
There was a problem hiding this comment.
LGTM, but one question, but this shouldn't block the merge
inifile.rb doesn't make any Puppet.* calls, we only need the Puppet::Settings namespace. As a result we can stub it and speed up the INI manipulator significantly. Signed-off-by: Miranda Streeter <miranda@mirandastreeter.com>
MirandaStreeter
commented
Jun 19, 2026
|
|
||
| if [ -n "${CERTNAME}" ]; then | ||
| puppet config set certname "$CERTNAME" | ||
| config_set main certname "$CERTNAME" |
Contributor
Author
There was a problem hiding this comment.
I've now gone through all the variables, and this one in particular breaks. Running with CERTNAME=certname.example.com ends up silently missing.
Contributor
Author
There was a problem hiding this comment.
It looks like the certificate's CN is correct, puppet.conf looks correct, but the value is stale within the cache and as a result healthcheck.sh fails with the wrong --cert value.
MirandaStreeter
commented
Jun 19, 2026
I could always use dot-sourcing but that's just not nearly as readable. Signed-off-by: Miranda Streeter <miranda@mirandastreeter.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description
This replaces the various
puppet configcommands with a small helper library that takes the values and manipulates them directly viaPuppet::Settings::IniFile, saving us a huge chunk of startup time.Part of #139
At first I tried using a series of
export <variable>for readability, but the entrypoint sequence modifies the results partway, and later entries rely on those modifications, of which they cannot inherent each other's environment. So instead we create a cache file and read/write from that.In the future I strongly believe we should hardcode many of these values. The more immutable the better. :)
Checklist
I have:
Signed-off-byannotation to each of my commitsGenerated-byorAssisted-byannotations to each of my commits created with the help of an AI agent