Skip to content

Commit

Permalink
Update pre-commit linters
Browse files Browse the repository at this point in the history
* fix or ignore linter errors
* install ansible-lint dependencies
  • Loading branch information
zaro0508 committed Sep 27, 2024
1 parent 97784a9 commit 4ca3f49
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
15 changes: 15 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
exclude_paths:
- temp
- .github
- .pre-commit-config.yaml
parseable: true
quiet: true
skip_list:
- "no-changed-when"
- "package-latest"
- "name[play]"
- "name[casing]"
- "fqcn[action]"
- "fqcn[action-core]"
use_default_rules: true
verbosity: 1
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: pre-commit/[email protected]
- name: Setup `packer`
uses: hashicorp/setup-packer@main
Expand All @@ -24,6 +22,8 @@ jobs:
- name: packer validate
run: |
pushd src
packer plugins install github.com/hashicorp/amazon
packer plugins install github.com/hashicorp/ansible
packer validate -var AmiImageName=validate template.json
deploy:
name: Deploy to AWS org-sagebase-imagecentral
Expand Down Expand Up @@ -54,4 +54,6 @@ jobs:
- name: Build and Upload AMI
run: |
pushd src
packer plugins install github.com/hashicorp/amazon
packer plugins install github.com/hashicorp/ansible
AWS_DEFAULT_REGION=${{ env.AWS_REGION }} packer build -force -var AmiImageName=${{ env.AMI_IMAGE_NAME }} template.json
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -9,7 +9,8 @@ repos:
- id: pretty-format-json
args: [--autofix]
- repo: https://github.com/ansible/ansible-lint
rev: v6.16.2
rev: v24.9.2
hooks:
- id: ansible-lint
files: src/.*\.(yaml|yml)$
additional_dependencies:
- ansible

0 comments on commit 4ca3f49

Please sign in to comment.