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 <copilot@github.com>
18 lines
706 B
YAML
18 lines
706 B
YAML
---
|
|
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: []
|