diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..5147798 --- /dev/null +++ b/.ansible-lint @@ -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 diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index d98d0d5..04cdadc 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -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/action@v3.0.0 - name: Setup `packer` uses: hashicorp/setup-packer@main @@ -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 @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d49ac55..0a6260b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,9 @@ +ci: + skip: [ansible-lint] + 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 @@ -9,7 +12,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