Repository navigation
Boot systemd as PID 1 in the default molecule docker config - #49
Merged
Merged
Conversation
The default molecule-config never set an explicit command for the docker platform, so the docker driver's own keep-alive default (a bare sleep loop) ran as PID 1 instead of the test image's actual CMD (["/lib/systemd/systemd"] for geerlingguy/docker-*-ansible images). Consuming repos relying on systemd/systemctl in their converge or prepare playbooks (e.g. systemli/ansible-role-userli#136) failed with "Service is in unknown state" because systemd never booted: /run/systemd/system was missing and `systemctl is-system-running` reported "offline". Set command explicitly to /lib/systemd/systemd so the image boots its real init regardless of the docker driver's default behavior. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0x46616c6b
marked this pull request as ready for review
July 29, 2026 14:37
0x46616c6b
added a commit
to systemli/ansible-role-userli
that referenced
this pull request
Jul 29, 2026
v1.6.2 (systemli/github-ansible-workflow#49) bakes the command: "/lib/systemd/systemd" fix into the default molecule-config, so the local override duplicating it here is no longer needed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
molecule-confignever set an explicitcommandfor the docker platform, so molecule's docker driver fell back to its own keep-alive default (a barebash -c "while true; do sleep 10000; done"loop) as PID 1, instead of the test image's actualCMD(["/lib/systemd/systemd"]forgeerlingguy/docker-*-ansibleimages).systemd/systemctlin their converge or prepare playbooks (e.g. Bump Userli to 6.10.2 ansible-role-userli#136) failed with"Service is in unknown state", since systemd never booted:/run/systemd/systemwas missing andsystemctl is-system-runningreported"offline".command: "/lib/systemd/systemd"explicitly on the platform so the image boots its real init regardless of the docker driver's default behavior.Test plan