test: cover root configuration with Molecule

Verify SSH key rotation, file permissions, optional file removal and password management on Arch Linux, Debian and Fedora. Keep container dependencies scoped to the test scenario.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
volker.raschekandCopilot committed 2026-10-18 14:46:48 +02:00
1 parent c2f50c4423
commit d7ab7e34d1
10 files changed
+334

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
---
- name: Prepare
hosts: all
gather_facts: false
vars:
_bootstrap: |
set -eu
if command -v pacman > /dev/null; then
pacman --sync --refresh --noconfirm openssh openssl python shadow
elif command -v apt-get > /dev/null; then
apt-get update
apt-get install --yes openssh-client openssl passwd python3
else
dnf install --assumeyes openssh-clients openssl python3 shadow-utils
fi
tasks:
- name: Bootstrap Python and the tools required by the role
ansible.builtin.raw: "/bin/sh -c {{ _bootstrap | quote }}"
changed_when: true