Commit Graph
16 Commits
Author SHA1 Message Date
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 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 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 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 1e2bcabc7f fix: value must be stored as a dictionary/hash 2025-04-21 22:33:35 +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 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 b997726f4f fix: access undefined variable
continuous-integration/drone/push Build is passing
2022-06-30 10:50:53 +00:00
volker.raschek db475e68d0 Initial Commit
continuous-integration/drone/push Build is passing
2022-05-10 13:40:31 +02:00