mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-08-29 20:13:13 +00:00
Symlink the shared requirements into each Molecule scenario
Molecule checks for a requirements file at the scenario's default path before it installs anything, and warns "Missing roles requirements file" when it is absent - so `requirements-file` pointing elsewhere was silently ignored and the galaxy roles were never installed. CI failed on a missing ansible-role-docker; the local run passed only because those roles were already in ~/.ansible/roles from earlier work, which is exactly the kind of difference a clean CI run exists to expose. A symlink satisfies Molecule's check while keeping one copy of the pins. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
8095bfda8b
commit
efe204829f
@@ -57,7 +57,7 @@ Role defaults are out of scope there, so any path it reads has to be pinned in t
|
||||
`molecule-shared/` holds what would otherwise be duplicated into every role:
|
||||
|
||||
- `requirements.txt` — the Python packages, for both CI and `just molecule`.
|
||||
- `requirements.yml` — the external Ansible roles and collections the scenarios need.
|
||||
- `requirements.yml` — the external Ansible roles and collections the scenarios need. Each scenario symlinks its own `molecule/default/requirements.yml` at this file: Molecule checks for a requirements file at that default path before it will install anything, so pointing at the shared one through `requirements-file` alone is silently ignored.
|
||||
- `vars.yml` — helper container images used for probing, pinned once. They carry `# renovate:` annotations and a custom manager in `.github/renovate.json` keeps them current.
|
||||
|
||||
A helper image is used to reach a role's container over its own container network. That indirection is deliberate: the roles publish no host port, matching a real deployment, and publishing one for the test would collide between scenarios running in parallel.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
dependency:
|
||||
name: galaxy
|
||||
options:
|
||||
requirements-file: ../../../../../molecule-shared/requirements.yml
|
||||
requirements-file: requirements.yml
|
||||
force: true
|
||||
driver:
|
||||
name: docker
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
../../../../../molecule-shared/requirements.yml
|
||||
Reference in New Issue
Block a user