Skip to content

Use validate_cmd to validate a CA before writing#86

Open
ekohl wants to merge 2 commits intovoxpupuli:masterfrom
ekohl:simplify
Open

Use validate_cmd to validate a CA before writing#86
ekohl wants to merge 2 commits intovoxpupuli:masterfrom
ekohl:simplify

Conversation

@ekohl
Copy link
Member

@ekohl ekohl commented Sep 29, 2025

This uses the built in validation of input. If the content is invalid, it is never written to the desired location. To make it easier, it first removes the almost duplicate branches.

Perhaps this also fixes the failed chaining of notifications that plagues Debian 11.

This uses the built in validation of input. If the content is invalid,
it is never written to the desired location.
@ekohl
Copy link
Member Author

ekohl commented Sep 29, 2025

So this doesn't appear to resolve #85, even though I'd expect it to. It's calling the right exec:

  Notice: /Stage[main]/Main/Trusted_ca::Ca[test]/File[/usr/local/share/ca-certificates/test.crt]/ensure: defined content as '{sha256}93863a10f8b1629bbc46eb31a7af0f5c3cda37e45162c86282d34c37e9d3108c'
  Info: /Stage[main]/Main/Trusted_ca::Ca[test]/File[/usr/local/share/ca-certificates/test.crt]: Scheduling refresh of Exec[update_system_certs]
  Notice: /Stage[main]/Trusted_ca/Exec[update_system_certs]: Triggered 'refresh' from 1 event
  Notice: Applied catalog in 1.21 seconds

@ekohl ekohl added the enhancement New feature or request label Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants