Skip to content

Commit

Permalink
Uncomment pre-commit hooks for ansible/packer; add exclude_paths to .…
Browse files Browse the repository at this point in the history
…ansible-lint.
  • Loading branch information
Matthew-Grayson committed Mar 11, 2024
1 parent 058bf55 commit 79220b9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
7 changes: 7 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ exclude_paths:
- .cache
# Seems wise to ignore this too
- .github
# Ignore all dependency directories and functions.yml
- node_modules
- backend/node_modules
- backend/src/tasks
- docs/node_modules
- frontend/node_modules
- frontend/scripts/node_modules
kinds:
# This will force our systemd specific molecule configurations to be treated
# as plain yaml files by ansible-lint. This mirrors the default kind
Expand Down
25 changes: 11 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,11 @@ repos:
hooks:
- id: pyupgrade

# # Ansible hooks
# This hook takes several minutes checking .yml files outside our version control and
# there are no ansible playbooks in this repository
# - repo: https://github.com/ansible/ansible-lint
# rev: v6.19.0
# hooks:
# - id: ansible-lint
# Ansible hooks
- repo: https://github.com/ansible/ansible-lint
rev: v6.19.0
hooks:
- id: ansible-lint
# files: molecule/default/playbook.yml

# Terraform hooks
Expand All @@ -157,10 +155,9 @@ repos:
hooks:
- id: docker-compose-check

# # Packer hooks
# This hook fails and there are no packer files in this repository
# - repo: https://github.com/cisagov/pre-commit-packer
# rev: v0.0.2
# hooks:
# - id: packer_validate
# - id: packer_fmt
# Packer hooks
- repo: https://github.com/cisagov/pre-commit-packer
rev: v0.0.2
hooks:
- id: packer_validate
- id: packer_fmt

0 comments on commit 79220b9

Please sign in to comment.