Skip to content

Commit

Permalink
upstream ci: Fix ansible-lint errors due to missing collections
Browse files Browse the repository at this point in the history
When running ansible-lint it tries to load and syntax check the
playbooks it evaluates, and if any of the modules used in the playbooks
can't be found, it fails with a fatal error, as if there was a syntax
error.

By adding a 'requirements.yml' file with all the collections that are
used in any playbook (be it a runtime, test, or development dependency),
forces ansible-lint to install and use the collections in its virtual
environment, successfully parsing the playbook files.

See more at ansible/ansible-lint#4048 and
ansible/ansible-lint#4049.
  • Loading branch information
rjeffman committed Mar 9, 2024
1 parent fedd89e commit cb06430
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# These collections are only required for testing and development.
# You should be able to use ansible-freeipa without installing these.
---
collections:
- name: ansible.posix
- name: community.docker
- name: containers.podman

0 comments on commit cb06430

Please sign in to comment.