Repository navigation
Fix docker molecule-config schema validation failure - #44
Merged
Merged
Conversation
molecule-plugins 26.7.15 added a JSON schema for the docker driver (ansible-community/molecule-plugins#340) requiring platforms.command to be a string. The command: "" line here was already turned into a YAML null by the yq e --inplace prepare-playbook step regardless of the quoting, so it never actually applied as an empty string - only the new schema check started rejecting the resulting null. Removing the line keeps the same effective behavior (no command override) while passing validation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0x46616c6b
marked this pull request as ready for review
July 25, 2026 20:25
0x46616c6b
added a commit
to systemli/ansible-role-userli
that referenced
this pull request
Jul 29, 2026
The debian13 integration job failed because systemd never booted as PID 1 in the molecule-created container (systemctl is-system-running reported "offline", PID 1 was a bare sleep loop). Root cause: molecule-plugins 26.7.15 added schema validation for the docker driver requiring platforms[].command to be a string, and the reusable workflow's yq-based config injection always turned its dead `command: ""` line into YAML null, which now fails validation (systemli/github-ansible-workflow#44). That validation failure left the container without a real init process. The fix landed on main of systemli/github-ansible-workflow but hasn't been tagged yet, so pin to that commit SHA instead of v1.6.1. Also drop the temporary debug task and revert the MariaDB task back to ansible.builtin.systemd now that the actual cause is fixed upstream. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0x46616c6b
added a commit
to systemli/ansible-role-userli
that referenced
this pull request
Jul 29, 2026
v1.6.1 already includes the docker molecule-config schema fix (systemli/github-ansible-workflow#44 was merged before the tag was cut), so pinning to the commit SHA directly was unnecessary. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0x46616c6b
added a commit
to systemli/ansible-role-userli
that referenced
this pull request
Jul 29, 2026
Every prepare-stage failure so far (empty systemctl status, "Service is in unknown state", "--now cannot be used when systemd is not running") traced back to the same root cause: PID 1 inside the molecule-created debian13 container was a bare keep-alive `bash -c "while true; do sleep 10000; done"`, not systemd. Debug output confirmed it: /run/systemd/system missing, systemctl is-system-running reports "offline". The geerlingguy/docker-debian13-ansible image's own CMD is ["/lib/systemd/systemd"], but the reusable workflow's generated molecule/github/molecule.yml never sets an explicit `command`, so the docker driver falls back to its own keep-alive default instead of the image's CMD. Pinning to v1.6.1 (systemli/github-ansible-workflow#44) fixed an unrelated schema-validation error but not this - the same "Service is in unknown state" failure reproduced afterwards. Override molecule-config to set `command: "/lib/systemd/systemd"` explicitly so the image boots real systemd regardless of driver defaults. 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-plugins26.7.15 added a JSON schema for the docker driver (ansible-community/molecule-plugins#340), which requiresplatforms[].commandto be a string.molecule-confighere setscommand: "", but theyq e --inplacestep that injects the prepare playbook always serializes this as YAMLnullregardless of the original quoting, so it never actually applied as an empty string in the generatedmolecule.yml.nullnow fails validation (ERROR Failed to validate .../molecule/github/molecule.yml), breaking Molecule integration jobs in consuming repos (e.g. Bump Userli to 6.10.2 ansible-role-userli#136) even though the role change itself is unrelated.command: ""line keeps the same effective behavior (no command override, same as the null it always produced) while passing schema validation.Test plan