From 0cb76c4bc8b9ffba649fdd808052fa3bd62882bb Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Thu, 10 Sep 2026 21:40:12 +0200 Subject: [PATCH] feat(meta): document sudo_users_sudoers via argument specs The only variable of the role was documented in defaults/main.yaml comments alone. An argument spec makes the variable discoverable through ansible-doc and lets ansible reject a wrong type early. The entries are intentionally left without suboptions. Argument spec validation fills missing suboptions with none, which would turn the item.user | default('') | length conditions in tasks/main.yaml into a runtime error. Co-authored-by: Copilot --- meta/argument_specs.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 meta/argument_specs.yaml diff --git a/meta/argument_specs.yaml b/meta/argument_specs.yaml new file mode 100644 index 0000000..7dddf02 --- /dev/null +++ b/meta/argument_specs.yaml @@ -0,0 +1,17 @@ +--- +argument_specs: + main: + short_description: "Role to configure sudoers on different distributions" + description: + - "This Ansible role installs sudo and manages drop-in files in /etc/sudoers.d." + - "Each drop-in file grants a unix user or a unix group the permission to execute commands, optionally as another + unix user." + author: "Markus Pesch" + options: + sudo_users_sudoers: + description: + - "List of sudoers drop-in files. Each entry must define either 'user' or 'group', but not both." + - "Supported keys are 'commands', 'filename', 'group', 'nopassword', 'runas', 'state' and 'user'." + type: list + elements: dict + default: []