Commit Graph
13 Commits
Author SHA1 Message Date
volker.raschekandCopilot 41d06e4e6d feat!: apply subject alternative names to root and intermediate CA
The variables `certificate_authority_root_ca_subject_alternative_names` and
`certificate_authority_intermediate_ca_subject_alternative_names` were
documented but never referenced by any task, so both CA certificates were always
issued without SANs. Wire them into the corresponding CSR tasks and fall back to
`omit` when the list is empty.

SAN entries are now passed to `openssl_csr` unchanged instead of being prefixed
with `DNS:` by the role. This allows other types such as `IP:` or `email:`,
which the previous rewrite would have corrupted into values like `DNS:IP:...`.
The client tasks additionally dropped `join(',') | quote`, because `quote`
performs shell escaping and `openssl_csr` expects a list.

Since both client CSR tasks only differed in `subject_alt_name`, they collapse
into a single task per file.

BREAKING CHANGE: Entries of all `*_subject_alternative_names` variables must now
carry their type prefix, for example `DNS:example.local` instead of
`example.local`.

Co-authored-by: Copilot <copilot@github.com>
2026-09-07 22:28:52 +02:00
volker.raschekandCopilot 38ab2f55bb fix: drop passphrase from CSR task for unencrypted client key
This task file is only included when
`certificate_authority_client_tls_key_passphrase` is empty, so the private key
is created without encryption. Passing the empty passphrase to `openssl_csr`
made the module attempt to decrypt an unencrypted key instead of treating it as
absent. The sibling CSR task for certificates with SANs already omitted the
attribute, so this also aligns both code paths.

Co-authored-by: Copilot <copilot@github.com>
2026-09-07 22:28:52 +02:00
volker.raschekandCopilot 309c5e0e65 fix: use client path instead of certificate content as destination
The task importing the client certificate passed
`certificate_authority_client_tls_crt_content` to `dest`, so the PEM payload
itself was interpreted as a directory path. The certificate was written to a
bogus location derived from its own content instead of the configured client
directory. Use `certificate_authority_client_path` as destination, consistent
with the private key import above.

Co-authored-by: Copilot <copilot@github.com>
2026-09-07 22:28:52 +02:00
volker.raschekandCopilot 32bd44a0a6 fix: use declared variable for client private key destination
The task importing the client private key referenced
`certificate_authority_client_ca_path`, a variable that is declared neither in
`defaults/main.yaml` nor in `meta/argument_specs.yaml`. Every run with
`certificate_authority_client_create: false` therefore aborted with an undefined
variable error before the key was written. Use the actual role variable
`certificate_authority_client_path` instead.

Co-authored-by: Copilot <copilot@github.com>
2026-09-07 22:28:52 +02:00
volker.raschek b112672d5a fix(tasks): create passphrase protected client certificate 2026-09-07 22:28:52 +02:00
volker.raschek 6208d55dcb fix(linter): be compliant with ansible-linter
Lint Markdown files / markdown-lint (push) Successful in 10s
Ansible Linter / ansible-lint (push) Successful in 33s
2025-08-06 10:55:42 +02:00
volker.raschek ef2c31e64e fix: remove state
Lint Markdown files / markdown-lint (push) Successful in 11s
Ansible Linter / ansible-lint (push) Failing after 41s
2025-07-31 19:08:10 +02:00
volker.raschek 1c40b1d59b feat: support further TLS certification properties
Lint Markdown files / markdown-lint (push) Successful in 10s
Ansible Linter / ansible-lint (push) Failing after 46s
2025-07-31 18:46:19 +02:00
volker.raschek c3fb49bbd4 fix(root_ca): set passphrase correctly
Lint Markdown files / markdown-lint (push) Successful in 13s
Ansible Linter / ansible-lint (push) Failing after 57s
2025-07-31 11:56:27 +02:00
volker.raschek 61b0a7c9ec fix: set cipher correctly
Ansible Linter / ansible-lint (push) Failing after 59s
Lint Markdown files / markdown-lint (push) Successful in 11s
2025-07-31 09:53:01 +02:00
volker.raschek dbbaacdc69 fix(root_ca): set passphrase correctly
Lint Markdown files / markdown-lint (push) Successful in 10s
Ansible Linter / ansible-lint (push) Failing after 1m0s
2025-07-31 09:49:12 +02:00
volker.raschek 505f0450d4 fix(intermediate_ca): set passphrase correctly
Lint Markdown files / markdown-lint (push) Has been cancelled
Ansible Linter / ansible-lint (push) Has been cancelled
2025-07-31 09:48:51 +02:00
volker.raschek a0ea59c528 Initial Commit
Lint Markdown files / markdown-lint (push) Successful in 11s
Ansible Linter / ansible-lint (push) Failing after 49s
2025-07-30 22:09:38 +02:00