From 0211a639238cd2439a44944067922d09bd108053 Mon Sep 17 00:00:00 2001 From: Claude Code AI - Gitea MCP <3+claude@noreply.git.rkdr.net> Date: Sun, 25 Oct 2026 12:14:52 +0000 Subject: [PATCH] fix(molecule): satisfy yamllint and shellcheck, and keep molecule's collection install job-local yamllint line-length on the MOLECULE_IMAGE value (166 > 160) and shellcheck SC2155 on the export. And: the first run showed molecule installing the collection under test into the runner user's ~/.ansible/collections and warning about the duplicate in the job tree. That copy outlives the job and the version stays 0.1.0, so a later run could resolve a stale one. ANSIBLE_HOME now points into the job tree, and a copy left by earlier runs is removed. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm --- .gitea/workflows/molecule.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/molecule.yml b/.gitea/workflows/molecule.yml index c8fe3a9..6aa4327 100644 --- a/.gitea/workflows/molecule.yml +++ b/.gitea/workflows/molecule.yml @@ -63,7 +63,8 @@ jobs: MOLECULE_COLLECTIONS: /opt/molecule-collections # Used by the scenarios as `image: ${MOLECULE_IMAGE}`; set it the same way to run # one locally. - MOLECULE_IMAGE: git.rkdr.net/mortis/molecule-ubuntu2404:0.1.0@sha256:80dbfa7f88309072e954ae20e80ee8171bd750abc7c1d9563c746bf6f0121f04 + MOLECULE_IMAGE: >- + git.rkdr.net/mortis/molecule-ubuntu2404:0.1.0@sha256:80dbfa7f88309072e954ae20e80ee8171bd750abc7c1d9563c746bf6f0121f04 steps: # Provisioned by the gitea_runner role (install_services); fail with a clear # message when this runs before it has. @@ -96,8 +97,15 @@ jobs: run: | # molecule calls ansible-config and ansible-playbook by name export PATH="$MOLECULE_VENV/bin:$PATH" - # the collection under test first, then what the roles use - export ANSIBLE_COLLECTIONS_PATH="$(cd ../../.. && pwd):$MOLECULE_COLLECTIONS" + # The collection under test first, then what the roles use. molecule also + # installs the collection under test into ANSIBLE_HOME; keep that inside the + # job tree so no run resolves a copy another run left in the runner user's + # home (the version stays 0.1.0, so a stale copy would look current). The rm + # clears a copy left there by runs before this was set. + ac_root="$(cd ../../.. && pwd)" + export ANSIBLE_HOME="$ac_root/.ansible" + export ANSIBLE_COLLECTIONS_PATH="$ac_root:$MOLECULE_COLLECTIONS" + rm -rf "$HOME/.ansible/collections/ansible_collections/mortis" failed="" ran=0 for cfg in extensions/molecule/*/molecule.yml; do