161 Commits
Author SHA1 Message Date
CSRBot fb39904bab Merge pull request 'chore(deps): update ansible/ansible-lint action to v26.9.0' (#63) from renovate/ansible-ansible-lint-26.x into master
Ansible Linter / ansible-lint (push) Successful in 1m57s
Lint Markdown files / markdown-lint (push) Successful in 12s
Molecule / Molecule (push) Successful in 5m59s
2026-09-22 19:40:01 +00:00
CSRBot a391fa1c2b chore(deps): update ansible/ansible-lint action to v26.9.0
Ansible Linter / ansible-lint (pull_request) Successful in 1m30s
Lint Markdown files / markdown-lint (pull_request) Successful in 7s
Lint Markdown files / markdown-lint (push) Successful in 6s
Ansible Linter / ansible-lint (push) Successful in 2m21s
Molecule / Molecule (pull_request) Successful in 5m10s
Molecule / Molecule (push) Successful in 5m7s
2026-09-22 19:19:53 +00:00
CSRBot 545e56bad5 Merge pull request 'chore(deps): update actions/checkout action to v7' (#62) from renovate/actions-checkout-7.x into master
Lint Markdown files / markdown-lint (push) Successful in 6s
Ansible Linter / ansible-lint (push) Successful in 5m52s
Molecule / Molecule (push) Successful in 7m45s
2026-09-15 15:54:42 +00:00
CSRBot 8d54768c1b chore(deps): update actions/checkout action to v7
Ansible Linter / ansible-lint (push) Successful in 5m46s
Lint Markdown files / markdown-lint (push) Successful in 15s
Ansible Linter / ansible-lint (pull_request) Successful in 5m43s
Lint Markdown files / markdown-lint (pull_request) Successful in 11s
Molecule / Molecule (push) Successful in 10m16s
Molecule / Molecule (pull_request) Successful in 7m7s
2026-09-15 15:21:57 +00:00
volker.raschekandCopilot afd4288ebd refactor: use the yml extension for every yaml file
Lint Markdown files / markdown-lint (push) Successful in 14s
Molecule / Molecule (push) Successful in 5m19s
Ansible Linter / ansible-lint (push) Successful in 4m22s
The repository mixed both extensions, the molecule scenario used yml while the role itself used yaml. The yml
extension is the one ansible-galaxy and molecule generate, so it is applied throughout and across the sibling roles.

The include_tasks calls in tasks/main.yml and tasks/create_unix_user.yml name their target explicitly and were
adjusted accordingly, otherwise the role would no longer find the included task files.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 22:06:43 +02:00
volker.raschekandCopilot e580de5e4c ci: install the molecule collections before linting
Lint Markdown files / markdown-lint (push) Successful in 11s
Ansible Linter / ansible-lint (push) Successful in 2m10s
Molecule / Molecule (push) Successful in 5m38s
Release Ansible Role / Release Ansible Role (push) Successful in 3m13s
ansible-lint does not only lint the role but the molecule scenario as well, and the scenario creates its containers
with community.docker. Only the runtime requirements of the role were installed, so the linter could not resolve
community.docker.docker_container and failed the syntax check.

The collection list of the scenario is a superset of the runtime requirements, therefore it is used instead of adding
a test only dependency to requirements.yml.

Co-authored-by: Copilot <copilot@github.com>
1.0.0
2026-09-10 17:51:14 +02:00
volker.raschekandCopilot 9b77592091 ci: run the molecule scenario on every push
Lint Markdown files / markdown-lint (push) Successful in 7s
Ansible Linter / ansible-lint (push) Failing after 3m12s
Molecule / Molecule (push) Successful in 6m15s
Without a workflow the scenario only runs when somebody remembers to run it locally, which is exactly the situation
the tests were written to end.

The repository is checked out into a directory named after the role and not after the repository, because the scenario
includes the role by its name and molecule puts the parent of the project directory on the roles path.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 10:16:18 +02:00
volker.raschekandCopilot a343205fd3 test(molecule): cover the role with a molecule scenario
The role changed a lot and none of it was verified against a real system so far. The scenario starts one container per
supported distribution family, applies the role and asserts afterwards that the users and groups exist as declared,
that the managed files carry the documented mode, owner and content, that a user without optional settings does not
receive any of the optional files and that a user declared as absent is gone again.

The idempotence step is the actual reason for the scenario. The deterministic password salt and the btrfs device
lookup were changed to stop reporting a change on every run, and only a second converge proves that.

A btrfs home is not covered, because a container has no btrfs filesystem to create a subvolume on.

The ssh key pair the scenario feeds into the role is generated during create and removed again during destroy, so no
private key material ends up in the repository. The generated files are ignored for the case that a destroy never
runs.

Co-authored-by: Copilot <copilot@github.com>
2026-09-10 09:54:00 +02:00
volker.raschekandCopilot 00f465e5e1 fix(meta): declare the versions the role actually requires
The role claimed to work with ansible 2.9, but two of its building blocks did not exist back then. The path_join
filter was introduced in ansible-base 2.10 and the btrfs_subvolume module in community.general 6.6.0, which in turn
requires ansible-core 2.11. Running the role on 2.9 therefore failed with an undefined filter instead of a readable
message about an unsupported control node.

The collection is now declared in a requirements.yml, mirroring the layout of the certificate_authority role, and the
lower bound is pinned because an older community.general still resolves but lacks the btrfs module. The linter
workflow installs that file, because ansible-lint cannot resolve the btrfs_subvolume tasks without the collection
being present, which only surfaced in CI where no collections are preinstalled.

Co-authored-by: Copilot <copilot@github.com>
2026-09-09 21:39:42 +02:00
volker.raschekandCopilot 5f757914be fix(tasks): remove the btrfs subvolume of a deleted unix user
Deleting a user whose home is a btrfs subvolume left that subvolume behind. The role passed remove=true to the user
module, but userdel removes a home directory with rmdir, which refuses to delete a subvolume that still holds nested
subvolumes or is otherwise not empty. The home therefore survived the removal and blocked a later recreation of the
same user, because btrfs_subvolume then found the path already occupied.

The subvolume is now deleted explicitly by the same module that created it, which keeps the creation and the removal
symmetric. Snapshots are stored outside the subvolume, so a btrbk based backup keeps the data available even though
the home itself is gone.

The removal is skipped when the home directory no longer exists, since findmnt fails on a missing path.

Co-authored-by: Copilot <copilot@github.com>
2026-09-09 21:39:42 +02:00
volker.raschekandCopilot f222b1c615 fix(tasks): hide secret material written by the netrc and ssh key tasks
The `no_log: true` on the include in tasks/main.yaml only censors the include statement and its loop item. It is not
inherited by the included tasks, which was verified with a minimal playbook: a debug task inside an included file prints
its message in clear even though the include itself is censored.

Two tasks therefore leaked secrets. The netrc template exposes every machine password in its rendered content, and the
copy of the private ssh keys exposes the key material itself. Both are printed by the diff mode, which is exactly the
mode used when reviewing what a run would change. They are marked `no_log` individually now.

The user task is deliberately left alone. Its `password` argument is declared `no_log` in the argument spec of the
module, so ansible already censors it, and a task level flag would only make the remaining output useless.

The blanket flag on the include stays in place, because the loop item still carries the plaintext password.

Co-authored-by: Copilot <copilot@github.com>
2026-09-09 21:39:42 +02:00
volker.raschekandCopilot 279ee1929a fix(tasks): create the bashrc before sourcing a drop-in from it
The lineinfile task appends the source line to `~/.bashrc` but never declared `create`, so it aborted with "Destination
does not exist" whenever that file was missing. This hits every user configured with `create_home: false`, and it hit
every btrfs user as well, because their home is an empty subvolume and useradd therefore skips the skel rollout.

`mode` is added along with it, otherwise a newly created bashrc would inherit whatever the umask happens to be. The
existing `owner` and `group` were dead settings until now, since the file was never created by this task.

Co-authored-by: Copilot <copilot@github.com>
2026-09-09 21:39:42 +02:00
volker.raschekandCopilot 41a645f748 fix(tasks): accept an integer gid when creating a unix group
The two group tasks differed only in whether `gid` was passed, and the branch between them tested
`unix_group.value.gid | length`. The length filter has no meaning for an integer and raises "object of type 'int' has no
len()". The example in defaults/main.yaml declares `gid: 1001` unquoted, so the documented usage aborted the run, while
the quoted variant in the README happened to work.

Both tasks are merged into one that passes the gid through `default(omit, true)`. The boolean form of the filter is
required to keep the previous meaning of an empty gid, which is to let the system assign one. The only value that
changes semantics is gid 0, which is the root group and outside the scope of this role.

Co-authored-by: Copilot <copilot@github.com>
2026-09-09 21:39:42 +02:00
volker.raschekandCopilot 517d9c1c54 refactor(tasks): prefix the home directory fact with the role name
`set_fact` writes into the play scope, so `user_user_home` outlived the loop iteration that set it and collided with any
playbook variable of the same name. Worse, if the defining task were ever skipped, every following task would silently
operate on the home directory of the previously processed user.

Renaming it to `_unix_users_home` marks it as role internal and matches the underscore prefix already used by the other
internal facts in this role. Purely mechanical, no behaviour changes.

Co-authored-by: Copilot <copilot@github.com>
2026-09-09 21:39:42 +02:00
volker.raschekandCopilot 095705643c fix(tasks): derive a deterministic password salt per unix user
`password_hash('sha512')` without an explicit salt generates a new random salt on every invocation. The resulting hash
differed on each run, so the user module rewrote /etc/shadow and reported a change every time the role was applied. This
was the single biggest obstacle to a green idempotence check.

The salt is now derived from the user name, which keeps the hash stable across runs while still giving every account its
own salt, so two users sharing a password do not end up with an identical hash.

Verified locally: repeated runs produce a byte identical hash, and different user names produce different ones.

Co-authored-by: Copilot <copilot@github.com>
2026-09-09 21:39:42 +02:00
volker.raschekandCopilot c34b59633c fix(tasks): stop reporting a change when looking up the btrfs device
`findmnt` only reads the mount table, but the task declared `changed_when` on a successful return code and therefore
reported a change on every single run. Any btrfs backed user made the whole play non idempotent, which an idempotence
check would flag as soon as one exists.

The `failed_when` on a non zero return code is dropped along with it, since that is exactly what the command module does
by default.

Co-authored-by: Copilot <copilot@github.com>
2026-09-09 21:39:42 +02:00
volker.raschekandCopilot 68ee8ebbcd fix(tasks)!: repair the broken guards in the unix user creation
Several defects accumulated in this task file and are fixed together, because they overlap in the same code paths.

The debug task was dead code. Its `msg` lacked the Jinja delimiters and would have printed the literal string
`_unix_users_btrfs_device.stdout`, and it was gated on `_unix_users_debug`, a variable that is neither defined in
defaults nor documented anywhere. It is removed instead of repaired, since the failure path already reports the device.

The four `ansible.builtin.user` tasks differed only in whether `uid` and `groups` were passed. They are collapsed into a
single task using `default(omit)`, which removes the risk that a fix lands in one of the four copies only. This also
fixes `comment`, which dereferenced `unix_user.value.name` unconditionally and aborted for every user that did not set
the undocumented and supposedly optional key.

Two conditions compared a length against zero with `>=`, which is true for any list. As a result an empty `ssh.config`
still produced a config file, and the removal counterpart never triggered. The create and remove pair for `.ssh/config`
now mirrors the one already used for `authorized_keys`.

The private key source was resolved through `{{ playbook_dir }}`, while the authorized key lookup in the template uses
the regular relative search path. Both now use the same mechanism, which is a superset of the previous location, so
existing playbook layouts keep working, and the role becomes testable from a molecule scenario.

BREAKING CHANGE:
The `.ssh` directory is only created when a user actually declares an `ssh` key, and an empty `ssh.config` list now
removes the client config instead of writing an empty one. Users who relied on the role to pre create an empty `~/.ssh`
have to declare `ssh: {}` explicitly.

Co-authored-by: Copilot <copilot@github.com>
2026-09-09 21:39:42 +02:00
volker.raschekandCopilot 91ba7845da fix(tasks): chown the btrfs home directory only after the user exists
The btrfs block chowned the freshly created subvolume to the user right after `btrfs_subvolume`, but the four
`ansible.builtin.user` tasks that actually create that user run further below. On a first run the chown therefore
aborted with an invalid user error, which made the whole btrfs code path unusable.

The task is removed rather than reordered, because an identical chown already exists in the "Adapt permissions and copy
skel" block below the user creation. That block also runs the skel copy first, so the file ownership set there is not
overwritten afterwards. The subvolume simply stays root owned for a few tasks longer, which a comment now records.

Co-authored-by: Copilot <copilot@github.com>
2026-09-09 21:39:42 +02:00
volker.raschekandCopilot 242f291200 fix(templates): render the documented function value in shell rc files
The template read `function.body`, while README and defaults/main.yaml document the key as `functions[].value`. Every
documented example therefore rendered an empty function body, and with a strict undefined policy the template failed
outright.

The documentation is the contract for this role, so the template follows it instead of the other way around.

Co-authored-by: Copilot <copilot@github.com>
2026-09-09 21:39:42 +02:00
volker.raschekandCopilot 68be6c5cdf fix(tasks): repair the never executed skel file copy
The task guarded itself with `_skel_file.stat.exist`, but the stat module returns `exists`. The `is defined` check on the
misspelled attribute therefore always evaluated to false and the whole task was silently skipped, so no skel file was
ever copied into a home directory.

Two further defects surfaced once the guard was corrected. The source path interpolated the registered result dict
`_skel_file` instead of the loop variable `skel_file`, and the copy module read from the control node because
`remote_src` was missing, so `/etc/skel` of the managed host was never consulted.

The stat now probes the source instead of the destination. Distributions ship different skel files, for example Debian
has no `.bash_profile`, and copying a non existing remote source would abort the run. The "only copy when absent"
behaviour is delegated to `force: false`, which the copy module implements natively. The register variable is prefixed
with the role name so it can no longer be confused with the loop variable. The mode is corrected to 0644, the mode
`/etc/skel` uses for its dotfiles.

Co-authored-by: Copilot <copilot@github.com>
2026-09-09 21:39:42 +02:00
CSRBot 2a32849bd0 Merge pull request 'chore(deps): update ansible/ansible-lint action to v26.8.0' (#61) from renovate/ansible-ansible-lint-26.x into master
Ansible Linter / ansible-lint (push) Successful in 37s
Lint Markdown files / markdown-lint (push) Successful in 7s
2026-08-12 09:15:59 +00:00
CSRBot 3c0b5b7386 chore(deps): update ansible/ansible-lint action to v26.8.0
Ansible Linter / ansible-lint (push) Successful in 48s
Lint Markdown files / markdown-lint (pull_request) Successful in 6s
Lint Markdown files / markdown-lint (push) Successful in 6s
Ansible Linter / ansible-lint (pull_request) Successful in 1m32s
2026-08-12 09:02:58 +00:00
CSRBot 9410b70830 Merge pull request 'chore(deps): update actions/checkout action to v6.1.0' (#60) from renovate/actions-checkout-6.x into master
Ansible Linter / ansible-lint (push) Successful in 34s
Lint Markdown files / markdown-lint (push) Successful in 6s
2026-07-20 18:23:32 +00:00
CSRBot 780e6df57f chore(deps): update actions/checkout action to v6.1.0
Ansible Linter / ansible-lint (push) Successful in 46s
Lint Markdown files / markdown-lint (push) Successful in 7s
Lint Markdown files / markdown-lint (pull_request) Successful in 6s
Ansible Linter / ansible-lint (pull_request) Successful in 1m44s
2026-07-20 18:03:07 +00:00
CSRBot da18299804 Merge pull request 'chore(deps): pin actions/checkout action to df4cb1c' (#58) from renovate/pin-dependencies into master
Ansible Linter / ansible-lint (push) Successful in 26s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-07-03 00:02:44 +00:00
CSRBot 9c1bfdba3b chore(deps): pin actions/checkout action to df4cb1c
Lint Markdown files / markdown-lint (push) Successful in 5s
Ansible Linter / ansible-lint (push) Successful in 30s
Ansible Linter / ansible-lint (pull_request) Successful in 27s
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
2026-07-02 21:03:26 +00:00
CSRBot 4f272fa518 Merge pull request 'chore(deps): update ansible/ansible-lint action to v26.6.0' (#59) from renovate/ansible-ansible-lint-26.x into master
Ansible Linter / ansible-lint (push) Successful in 36s
Lint Markdown files / markdown-lint (push) Successful in 6s
2026-07-02 18:35:03 +00:00
CSRBot b147d9e827 chore(deps): update ansible/ansible-lint action to v26.6.0
Ansible Linter / ansible-lint (pull_request) Successful in 1m33s
Lint Markdown files / markdown-lint (pull_request) Successful in 12s
Lint Markdown files / markdown-lint (push) Successful in 12s
Ansible Linter / ansible-lint (push) Successful in 37s
2026-07-02 18:02:54 +00:00
CSRBot d59bed93c6 Merge pull request 'chore(deps): update davidanson/markdownlint-cli2-action action to v23' (#57) from renovate/davidanson-markdownlint-cli2-action-23.x into master
Ansible Linter / ansible-lint (push) Successful in 45s
Lint Markdown files / markdown-lint (push) Successful in 6s
2026-06-15 18:15:59 +00:00
CSRBot 142df1da6e chore(deps): update davidanson/markdownlint-cli2-action action to v23
Ansible Linter / ansible-lint (push) Successful in 1m15s
Lint Markdown files / markdown-lint (pull_request) Successful in 7s
Lint Markdown files / markdown-lint (push) Successful in 5s
Ansible Linter / ansible-lint (pull_request) Successful in 2m4s
2026-06-15 18:02:35 +00:00
CSRBot c7a8e3c5ab Merge pull request 'chore(deps): update actions/checkout action to v6.0.3' (#52) from renovate/actions into master
Ansible Linter / ansible-lint (push) Failing after 9s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-06-02 15:15:41 +00:00
CSRBot 3afee5bce7 chore(deps): update actions/checkout action to v6.0.3
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
Ansible Linter / ansible-lint (pull_request) Successful in 1m5s
Ansible Linter / ansible-lint (push) Successful in 28s
Lint Markdown files / markdown-lint (push) Successful in 10s
2026-06-02 15:02:46 +00:00
CSRBot 73adc91eb3 Merge pull request 'chore(deps): update ansible/ansible-lint action to v26.4.0' (#51) from renovate/actions into master
Ansible Linter / ansible-lint (push) Failing after 8s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-04-14 11:08:08 +00:00
CSRBot cc6c1b1189 chore(deps): update ansible/ansible-lint action to v26.4.0
Ansible Linter / ansible-lint (pull_request) Successful in 24s
Ansible Linter / ansible-lint (push) Successful in 29s
Lint Markdown files / markdown-lint (pull_request) Successful in 18s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-04-14 10:48:25 +00:00
CSRBot 151bb67e3d Merge pull request 'chore(deps): update ansible/ansible-lint action to v26.3.0' (#50) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 1m0s
Lint Markdown files / markdown-lint (push) Successful in 10s
2026-03-05 14:07:07 +00:00
CSRBot b1e7bc5993 chore(deps): update ansible/ansible-lint action to v26.3.0
Lint Markdown files / markdown-lint (push) Successful in 6s
Ansible Linter / ansible-lint (pull_request) Successful in 20s
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
Ansible Linter / ansible-lint (push) Successful in 59s
2026-03-05 14:01:55 +00:00
CSRBot f34d963618 Merge pull request 'chore(deps): update ansible/ansible-lint action to v26.2.0' (#49) from renovate/actions into master
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 24s
2026-02-25 17:25:02 +00:00
CSRBot 14325d5f4a chore(deps): update ansible/ansible-lint action to v26.2.0
Ansible Linter / ansible-lint (push) Successful in 20s
Lint Markdown files / markdown-lint (push) Successful in 5s
Lint Markdown files / markdown-lint (pull_request) Successful in 6s
Ansible Linter / ansible-lint (pull_request) Successful in 59s
2026-02-25 17:18:52 +00:00
CSRBot f322c8078a Merge pull request 'chore(deps): update actions/checkout action to v6.0.2' (#48) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 18s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-01-22 17:10:08 +00:00
CSRBot a2bf5cac96 chore(deps): update actions/checkout action to v6.0.2
Lint Markdown files / markdown-lint (push) Successful in 5s
Ansible Linter / ansible-lint (pull_request) Successful in 19s
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
Ansible Linter / ansible-lint (push) Successful in 59s
2026-01-22 17:01:44 +00:00
CSRBot 2a514a3588 Merge pull request 'chore(deps): update ansible/ansible-lint action to v26.1.1' (#47) from renovate/actions into master
Lint Markdown files / markdown-lint (push) Successful in 9s
Ansible Linter / ansible-lint (push) Successful in 18s
2026-01-16 05:06:26 +00:00
CSRBot c64e2b85b2 chore(deps): update ansible/ansible-lint action to v26.1.1
Ansible Linter / ansible-lint (push) Successful in 17s
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 57s
2026-01-16 05:01:25 +00:00
CSRBot b14f3ee512 chore(deps): update ansible/ansible-lint action to v26
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 58s
Ansible Linter / ansible-lint (push) Successful in 20s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-01-11 23:01:16 +00:00
volker.raschek a4b28d441b fix(ci): add workflow dispatch for releases
Ansible Linter / ansible-lint (push) Successful in 18s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-01-11 21:16:12 +01:00
volker.raschek 1ec88f37fb fix(ci): use dynamic github repository name
Ansible Linter / ansible-lint (push) Successful in 19s
Lint Markdown files / markdown-lint (push) Successful in 4s
Release Ansible Role / Release Ansible Role (push) Successful in 56s
0.2.3
2026-01-07 16:09:07 +01:00
volker.raschek 09c4173eaf docs(ci): get steps a dedicated name
Ansible Linter / ansible-lint (push) Successful in 19s
Lint Markdown files / markdown-lint (push) Successful in 4s
2026-01-07 16:02:12 +01:00
volker.raschek 14f856fdea fix(ci): add release workflow
Ansible Linter / ansible-lint (push) Successful in 20s
Lint Markdown files / markdown-lint (push) Successful in 4s
Release to Ansible Galaxy / release (push) Successful in 59s
0.2.2
2026-01-07 16:00:01 +01:00
volker.raschek 86d85c431c fix!: rename environments to envs
Ansible Linter / ansible-lint (push) Successful in 19s
Lint Markdown files / markdown-lint (push) Successful in 4s
0.2.1
2026-01-07 11:16:12 +01:00
volker.raschek 88e9a163e1 docs: support environment variables in authorized_keys file
Ansible Linter / ansible-lint (push) Successful in 18s
Lint Markdown files / markdown-lint (push) Successful in 5s
0.2.0
2026-01-07 10:35:40 +01:00
volker.raschek 69491c9aa0 feat: support environment variables in authorized_keys file
Ansible Linter / ansible-lint (push) Successful in 21s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-01-07 10:28:13 +01:00