Skip to content

Commit a68a9b5

Browse files
jsf9kmcdonnnj
andcommitted
Pull in the same version of ansible as is used in requirements-test.txt
Co-authored-by: Nick <50747025+mcdonnnj@users.noreply.github.com>
1 parent 32e1a61 commit a68a9b5

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.pre-commit-config.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,19 @@ repos:
158158
hooks:
159159
- id: ansible-lint
160160
additional_dependencies:
161-
# For some reason ansible-lint does not know about the
162-
# existence of ansible.posix.mount unless ansible itself is
163-
# added as an extra dependency. I (jsf9k) believe this is
164-
# because ansible is not installed when ansible-lint is
165-
# installed.
166-
- ansible
161+
# Per the documentation and the pre-commit hook
162+
# configuration, ansible-lint does not know about modules
163+
# that live outside of ansible-core. See these links for
164+
# more details:
165+
# - https://github.com/ansible/ansible-lint/blob/main/src/ansiblelint/rules/syntax_check.md#syntax-checkunknown-module
166+
# - https://github.com/ansible/ansible-lint/blob/ad0157eb38059b02d57458504340209f221e3189/.pre-commit-hooks.yaml#L14-L19
167+
#
168+
# Since ansible.posix.mount lives inside of the ansible
169+
# package itself, we must include that package here.
170+
#
171+
# Note also that for consistency's sake we pull in the same
172+
# version of ansible that is used in requirements-test.txt.
173+
- ansible>=8,<10
167174
# files: molecule/default/playbook.yml
168175

169176
# Terraform hooks

0 commit comments

Comments
 (0)