fix: install cryptography via the distribution package manager

Installing the python cryptography bindings with ansible.builtin.pip is rejected by PEP 668 on distributions
which mark their python installation as externally managed. Fedora 38+, Ubuntu 23.04+ and RHEL 10 are
affected, so the role aborted on its very first task there.

The package names are resolved from vars/ via first_found, which keeps distribution specifics out of the
task file. vars/main.yaml provides python3-cryptography as a fallback for every family without a dedicated
file, Archlinux overrides it with python-cryptography.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-09-07 22:30:23 +02:00
co-authored by Copilot
parent e6092685e9
commit 625e93b524
3 changed files with 26 additions and 3 deletions
+4
View File
@@ -0,0 +1,4 @@
---
certificate_authority_python_packages:
- python-cryptography
+6
View File
@@ -0,0 +1,6 @@
---
# Fallback for distributions without a dedicated vars file. Overridden by the
# os-specific file included in tasks/main.yaml.
certificate_authority_python_packages:
- python3-cryptography