Skip to content

Commit 7ddea47

Browse files
authored
Merge pull request #182 from cisagov/improvement/pin-packages-for-ansible-lint
Pin packages for `ansible-lint`
2 parents de92c3c + c617bb9 commit 7ddea47

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.pre-commit-config.yaml

+19-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,25 @@ repos:
155155
rev: v24.6.0
156156
hooks:
157157
- id: ansible-lint
158-
# files: molecule/default/playbook.yml
158+
additional_dependencies:
159+
# On its own ansible-lint does not pull in ansible, only
160+
# ansible-core. Therefore, if an Ansible module lives in
161+
# ansible instead of ansible-core, the linter will complain
162+
# that the module is unknown. In these cases it is
163+
# necessary to add the ansible package itself as an
164+
# additional dependency, with the same pinning as is done in
165+
# requirements-test.txt of cisagov/skeleton-ansible-role.
166+
# - ansible>=9,<10
167+
# ansible-core 2.16.3 through 2.16.6 suffer from the bug
168+
# discussed in ansible/ansible#82702, which breaks any
169+
# symlinked files in vars, tasks, etc. for any Ansible role
170+
# installed via ansible-galaxy. Hence we never want to
171+
# install those versions.
172+
#
173+
# Note that any changes made to this dependency must also be
174+
# made in requirements.txt in cisagov/skeleton-packer and
175+
# requirements-test.txt in cisagov/skeleton-ansible-role.
176+
- ansible-core>=2.16.7
159177

160178
# Terraform hooks
161179
- repo: https://github.com/antonbabenko/pre-commit-terraform

0 commit comments

Comments
 (0)