Add requirements.yml, a Kamino-owned file with exact pins for the collections the roles call (community.general 14.0.0, ansible.posix 2.2.2), and install it into /opt/collections of the ci image (#118). Lint sets ANSIBLE_COLLECTIONS_PATH to it, so ansible-lint --offline resolves the modules and mock_modules is dropped. The file joins /opt/ci-pins.sha256: a pull request that changes a pin installs the collections for its own run, as it does for requirements-dev.txt. mock_roles stays (step 5 of #118). The install scopes ANSIBLE_COLLECTIONS_PATH to its target: ansible-galaxy skips a collection it finds elsewhere on the path as already installed, so the image would otherwise miss any that the build host happens to have. Image input: ci 0.2.15 -> 0.2.16 (one bump for this change and the ruff and shellcheck hooks of #112, which are also baked into the image). requirements.yml is added to the image.yml push paths so that a pin change rebuilds the image. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
27 lines
989 B
Plaintext
27 lines
989 B
Plaintext
---
|
|
# Same profile as the environment repo. The production profile enforces
|
|
# var-naming[no-role-prefix]: every role variable carries the role name as a prefix.
|
|
profile: production
|
|
|
|
exclude_paths:
|
|
- .gitea
|
|
- .venv
|
|
- apm_modules
|
|
- apm.lock.yaml
|
|
- changelogs
|
|
- images
|
|
|
|
# The Collection is checked out outside an ansible_collections/mortis/kamino path (CI clones it
|
|
# into the workspace), so ansible-lint cannot resolve a role of this Collection by its FQCN in
|
|
# a scenario's converge play. List the roles the scenarios call by FQCN.
|
|
mock_roles:
|
|
- mortis.kamino.docker
|
|
- mortis.kamino.fail2ban
|
|
- mortis.kamino.network_interfaces
|
|
- mortis.kamino.system_baseline
|
|
- mortis.kamino.systemd_hardening
|
|
|
|
# The collections of the Collection's dependencies (galaxy.yml) are pinned in requirements.yml and
|
|
# resolved offline: the ci image bakes them into /opt/collections and scripts/dev-setup.sh installs
|
|
# them into .ansible/collections, so their modules are linted, not mocked.
|