From 6d465e5dadb2603052bc65346b0bb431c06180f1 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Mon, 7 Sep 2026 22:26:00 +0200 Subject: [PATCH] docs: declare the dependency on the collection community.crypto The role uses openssl_privatekey, openssl_csr, x509_certificate and x509_certificate_info, but neither declared that collection anywhere nor mentioned it in the readme. A standalone role cannot express collection dependencies in its metadata, so a requirements file next to the readme section is the usual way. The section also documents two requirements that arose from the recent changes and were undocumented as well. Facts have to be gathered, because the package names, the trust store anchor and the update command are resolved by distribution, os_family and architecture. And the role needs become, since it writes into /etc and updates the trust store. No version is pinned. All used modules exist since community.crypto 1.0.0, so a lower bound would be arbitrary. Co-authored-by: Copilot --- README.md | 13 +++++++++++++ requirements.yaml | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 requirements.yaml diff --git a/README.md b/README.md index 9460f33..d6a2372 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,19 @@ This Ansible role can be used to create a root and intermediate certificate auth them. Additionally offers the ansible role the feature to import the certificates of the authority into the systems trust store. +## Requirements + +The role relies on the modules of the collection `community.crypto`. + +```bash +ansible-galaxy collection install -r requirements.yaml +``` + +Facts must be gathered, because the names of the required python packages, the location of the trust store anchor and +the command to update the trust store are looked up by `ansible_facts['distribution']`, `ansible_facts['os_family']` +and `ansible_facts['architecture']`. Archlinux, Debian and RedHat based distributions are supported. Furthermore the +role writes into `/etc` and updates the systems trust store, so it has to be executed with `become: true`. + ## Examples The following minimal example creates a root and intermediate certificate authority and issues a client certificate from diff --git a/requirements.yaml b/requirements.yaml new file mode 100644 index 0000000..3725f78 --- /dev/null +++ b/requirements.yaml @@ -0,0 +1,4 @@ +--- + +collections: +- name: community.crypto