Skip to content

Commit 06cc6d7

Browse files
Require ansible-core 2.19 when used as a pre-commit hook (#4744)
Co-authored-by: Shatakshi Mishra <[email protected]>
1 parent 132c290 commit 06cc6d7

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.pre-commit-hooks.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# See usage instructions at http://pre-commit.com
44

55
- id: ansible-lint
6-
name: Ansible-lint
6+
# keep name lowercase for consistency with other hook names
7+
name: ansible-lint
78
description: This hook runs ansible-lint.
89
entry: python3 -m ansiblelint -v --force-color
910
language: python
@@ -15,5 +16,6 @@
1516
# https://github.com/pre-commit/pre-commit/issues/1526
1617
# If you want to use specific version of ansible-core or ansible, feel
1718
# free to override `additional_dependencies` in your own hook config
18-
# file.
19-
- ansible-core>=2.16.0
19+
# file as we only support latest stable version of ansible-core when used
20+
# as an action.
21+
- ansible-core>=2.19.0

docs/configuring.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ them and it does not install them by default.
7777
[pre-commit.ci] is a hosted service that can run pre-commit for you
7878
on each change but you can also run the tool yourself using the CI of your choice.
7979

80+
!!! warning
81+
82+
We only support using latest version of ansible-core when running as
83+
a pre-commit hook. Still, you can bypass this by changing the
84+
`additional_dependencies`.
85+
8086
Change **rev:** to either a commit sha or tag of Ansible-lint that contains
8187
`.pre-commit-hooks.yaml`.
8288

0 commit comments

Comments
 (0)