From 04b8c6ebbf1df9f2975f0c44c5609dae8fe4e7c2 Mon Sep 17 00:00:00 2001 From: Ahmed AbdelHalim Date: Thu, 11 Dec 2025 14:23:56 +0100 Subject: Update the testing to match real scenario (with passwordless test_group) The passwordless test_group is required to allow switching users without needing to add the password --- molecule/raspberrypi/Dockerfile.j2 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'molecule/raspberrypi/Dockerfile.j2') diff --git a/molecule/raspberrypi/Dockerfile.j2 b/molecule/raspberrypi/Dockerfile.j2 index b65d05ae..51d6b0dd 100644 --- a/molecule/raspberrypi/Dockerfile.j2 +++ b/molecule/raspberrypi/Dockerfile.j2 @@ -20,6 +20,10 @@ RUN rm -f /lib/systemd/system/multi-user.target.wants/getty.target RUN systemctl enable avahi-daemon \ && touch /etc/locale.gen +# Enable passwordless sudo for test_group (created by the user role) +RUN echo '%test_group ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/test_group && \ + chmod 0440 /etc/sudoers.d/test_group + VOLUME ["/sys/fs/cgroup", "/tmp", "/run", "/opt"] CMD ["/lib/systemd/systemd"] -- cgit v1.2.3