Commit Graph
42 Commits
Author SHA1 Message Date
volker.raschekandCopilot ee977a8610 fix(ci): pin actions to their commit sha
Floating tags let a compromised or force pushed release change what the workflows execute. Pinning the actions to a
commit sha and restricting the default token to read access limits the blast radius of a supply chain attack. The
outdated ansible-lint and markdownlint-cli2 versions are raised along with the pinning.

The ansible-lint run installs the collections of the molecule scenario, because the scenario is linted as well and
depends on community.docker beside the community.general requirement of the role.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 21:41:34 +02:00
volker.raschekandCopilot e2f248e28d test: verify the role with molecule
The role was not covered by any automated test, so regressions in the drop-in file handling only surfaced on real
hosts. The scenario starts one container per supported distribution family and covers all four conditional branches of
tasks/main.yaml: a user, a user acting as another user, a group and a group acting as another user.

Beside the created rules the verification asserts that a rule declared as absent is removed again, that the drop-in
directory is included exactly once and that visudo accepts the resulting configuration, because a rejected drop-in file
invalidates every rule of the directory.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 21:41:34 +02:00
volker.raschekandCopilot 0cb76c4bc8 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 <copilot@github.com>
2026-09-10 21:41:34 +02:00
volker.raschekandCopilot 1e70b5f11f fix(meta): declare Debian as supported platform
The role ships vars/Debian.yaml and the README lists Debian, but the galaxy metadata did not advertise the platform, so
Ansible Galaxy hid the role from users searching for Debian.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 21:41:34 +02:00
volker.raschekandCopilot 3947d4e30a style(yamllint): add document start marker
The yamllint configuration enabled the default rule set, which includes document-start, but omitted the marker in its
own file. Linting the repository therefore reported a violation in the configuration itself.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 21:41:34 +02:00
volker.raschekandCopilot 50ab126130 fix(tasks): fall back to user or group for empty filename
The default filter only replaces undefined values unless its boolean flag is
enabled. An entry with 'filename: ""' - as documented in defaults/main.yaml -
therefore produced a sudoers drop-in file without a name. Enabling the flag
makes the role fall back to the user or group name for empty filenames as
well.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 21:41:34 +02:00
volker.raschekandCopilot 09f4b9fe4c fix(tasks): match entries with empty user, group or runas values
The conditions relied on 'is defined' and 'is not defined'. An entry which
declares the unused key with an empty string - as documented in
defaults/main.yaml - matched none of the four tasks, so the sudoers drop-in
file was silently not created. Comparing the length of the defaulted values
instead makes exactly one task apply to every entry accepted by the
validation.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 21:41:34 +02:00
volker.raschekandCopilot c5011457e9 fix(meta): raise min_ansible_version to 2.11
Ansible 2.9 can neither resolve the used fully qualified collection names
reliably nor ship the community.general.sudoers module, which requires
ansible-base 2.10 or newer. Align the requirement with the sibling role
unix-users, which already declares 2.11.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 21:41:34 +02:00
volker.raschekandCopilot fec90dc9be feat: declare community.general collection requirement
The role uses the community.general.sudoers module, but did not declare the
collection dependency like the sibling roles unix-users and
certificate_authority do. The sudoers module was added in community.general
4.3.0, its runas parameter in 4.7.0, therefore 4.7.0 is the lowest usable
version.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 21:41:34 +02:00
volker.raschekandCopilot d2e4036430 fix(tasks): match @includedir directive in /etc/sudoers
The regular expression required a leading hash, but sudo 1.9.1 introduced @includedir and distributions such as
Debian 12, Ubuntu 22.04, RHEL 9 and Arch Linux ship /etc/sudoers with that syntax. Since the existing line was never
matched, lineinfile appended a second directive and /etc/sudoers.d was included twice.

The dot in sudoers.d is escaped as well, so the expression no longer matches unrelated paths.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 21:41:34 +02:00
volker.raschekandCopilot c3f714a7c6 fix(tasks)!: stop flushing /etc/sudoers.d
Recreating /etc/sudoers.d on every run deleted every drop-in file on the host, not only the ones managed by this role.
That removes files shipped by packages or other tooling, such as 90-cloud-init-users on cloud instances, which can lock
out the remaining login paths. The task also reported changed on every run and therefore made check mode and CI runs
useless for detecting real drift.

The directory is now only ensured with its owner, group and permissions. To keep entries removable, each item of
sudo_users_sudoers accepts an optional state, which is passed to community.general.sudoers and defaults to present.

BREAKING CHANGE: Entries dropped from sudo_users_sudoers are no longer deleted implicitly. Set state: absent on the
entry to remove its drop-in file.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 21:41:34 +02:00
volker.raschekandCopilot 7c76a5cc86 fix(tasks): include verify_vars.yaml as tasks file
The variable verification was included via include_vars, which is meant for variable files only. Additionally the
first_found lookup had no paths defined, so it searched the files/ subdirectory and the role root instead of tasks/ and
failed with "No file was found". Switching to include_tasks and adding the tasks path makes the verification run at all.

The assertion itself was fully commented out and is now active, so a misconfigured entry fails early instead of being
silently skipped by all four sudoers tasks.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 21:41:34 +02:00
volker.raschek 161d72089e fix(ci): add workflow dispatch for releases
Lint Markdown files / markdown-lint (push) Successful in 6s
Ansible Linter / ansible-lint (push) Successful in 55s
2026-01-11 21:16:09 +01:00
volker.raschek 58d25578d7 fix(ci): use dynamic github repository name
Ansible Linter / ansible-lint (push) Successful in 16s
Lint Markdown files / markdown-lint (push) Successful in 4s
2026-01-07 16:11:15 +01:00
volker.raschek 3af115d465 fix(ci): add release workflow
Ansible Linter / ansible-lint (push) Successful in 16s
Lint Markdown files / markdown-lint (push) Successful in 4s
2026-01-07 16:05:38 +01:00
volker.raschek a8e2ba74ee fix: replace deprecated INJECT_FACTS_AS_VARS
Ansible Linter / ansible-lint (push) Successful in 16s
Lint Markdown files / markdown-lint (push) Successful in 4s
2026-01-05 10:31:11 +01:00
volker.raschek b946da2d8d fix: replace deprecated INJECT_FACTS_AS_VARS
Ansible Linter / ansible-lint (push) Successful in 17s
Lint Markdown files / markdown-lint (push) Successful in 4s
2026-01-05 10:28:07 +01:00
volker.raschek 6679f1602f fix(lint): close bracket
Lint Markdown files / markdown-lint (push) Successful in 5s
Ansible Linter / ansible-lint (push) Successful in 55s
2025-11-23 16:21:40 +01:00
volker.raschek 6469d81fcf fix: rename files to .yaml
Ansible Linter / ansible-lint (push) Failing after 17s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-11-23 16:19:51 +01:00
volker.raschek f2dc0be80d fix: prepare for INJECT_FACTS_AS_VARS
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Failing after 57s
2025-11-22 23:53:42 +01:00
volker.raschek 7ba49f476e chore(deps): update actions/checkout to v5.0.0
Lint Markdown files / markdown-lint (push) Successful in 9s
Ansible Linter / ansible-lint (push) Successful in 14s
2025-09-18 22:33:18 +02:00
volker.raschek 8160509a05 fix(ansible-galaxy): adapt indentation
Lint Markdown files / markdown-lint (push) Successful in 9s
Ansible Linter / ansible-lint (push) Successful in 52s
2025-08-06 16:10:34 +02:00
volker.raschek c4de350a3c fix(ansible-galaxy): add namespace
Lint Markdown files / markdown-lint (push) Successful in 19s
Ansible Linter / ansible-lint (push) Failing after 51s
2025-08-06 15:22:44 +02:00
volker.raschek ebb37be03f fix(ansible-galaxy): adapt list of supported platforms
Ansible Linter / ansible-lint (push) Failing after 45s
Lint Markdown files / markdown-lint (push) Successful in 15s
2025-08-06 11:45:05 +02:00
volker.raschek e6ea326d15 fix(ansible-galaxy): remove namespace
Ansible Linter / ansible-lint (push) Failing after 29s
Lint Markdown files / markdown-lint (push) Successful in 12s
2025-08-06 11:39:32 +02:00
volker.raschek 55c0d11edf docs(README): remove drone badge
Ansible Linter / ansible-lint (push) Successful in 13s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-06-01 12:27:38 +02:00
volker.raschek 5a03c4cfcb chore(ci): use DavidAnson/markdownlint-cli2-action
Ansible Linter / ansible-lint (push) Successful in 13s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-05-13 21:20:11 +02:00
volker.raschek c7477a9c2a fix: value must be stored as a dictionary/hash
Lint Markdown files / markdown-lint (push) Successful in 12s
Ansible Linter / ansible-lint (push) Successful in 43s
2025-04-21 22:51:40 +02:00
volker.raschek f74836f533 fix: value must be stored as a dictionary/hash
Lint Markdown files / markdown-lint (push) Successful in 1m16s
Ansible Linter / ansible-lint (push) Successful in 1m27s
2025-04-21 22:38:42 +02:00
volker.raschek ed3f2098d9 style(vscode): set correct file association
Lint Markdown files / markdown-lint (push) Successful in 12s
Ansible Linter / ansible-lint (push) Successful in 2m45s
2025-04-21 22:34:19 +02:00
volker.raschek 1e2bcabc7f fix: value must be stored as a dictionary/hash 2025-04-21 22:33:35 +02:00
volker.raschek e46a576674 fix(ci): remove requirements condition
Ansible Linter / ansible-lint (push) Successful in 56s
Lint Markdown files / markdown-lint (push) Successful in 9s
2025-04-14 22:50:33 +02:00
volker.raschek a07d698f3c fix(linter): get running
Ansible Linter / ansible-lint (push) Failing after 46s
Lint Markdown files / markdown-lint (push) Successful in 11s
2025-04-14 22:47:03 +02:00
volker.raschek 762fde2274 fix(ci): remove workflow_dispatch
Ansible Linter / ansible-lint (push) Failing after 47s
Lint Markdown files / markdown-lint (push) Successful in 10s
2025-04-14 22:34:34 +02:00
volker.raschek 98a299c4e0 feat(act-runner): init
Lint Markdown files / markdown-lint (push) Waiting to run
Ansible Linter / ansible-lint (push) Has been cancelled
2025-04-14 22:31:30 +02:00
volker.raschek 37e17ed119 chore(renovate): use configuration preset
continuous-integration/drone/push Build encountered an error
2025-04-01 22:20:48 +02:00
volker.raschek 5625ad8747 fix(meta): adapt role_name 2024-03-27 12:43:23 +01:00
volker.raschek 61a7c24fe2 fix: remove obsolete tags 2023-08-22 20:28:23 +02:00
volker.raschek 2a4e3e4ef3 fix: remove tags
continuous-integration/drone/push Build is passing
2023-05-14 20:27:32 +02:00
volker.raschek 51bf2a08cf fix: specify further sudoes settings
continuous-integration/drone/push Build is passing
2023-02-16 15:12:03 +01:00
volker.raschek 93fe0a4826 fix: enable includedir directive
continuous-integration/drone/push Build is passing
2023-02-15 21:49:51 +01:00
volker.raschek db475e68d0 Initial Commit
continuous-integration/drone/push Build is passing
2022-05-10 13:40:31 +02:00