aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-09-01 16:42:45 +0100
committerGravatar Joe Banks <[email protected]>2024-09-01 16:44:05 +0100
commit8a994afac9ed137337bc5be21a627701a608f5cd (patch)
tree797e40f14af1781561ad22b21d12ca8a5c7a37d0
parentUpdate Ansible lint config to ignore Jinja spacing rule (diff)
Install Galaxy dependencies in CI with cache
-rw-r--r--.github/workflows/lint-ansible.yaml12
1 files changed, 11 insertions, 1 deletions
diff --git a/.github/workflows/lint-ansible.yaml b/.github/workflows/lint-ansible.yaml
index b16111b..c17e60e 100644
--- a/.github/workflows/lint-ansible.yaml
+++ b/.github/workflows/lint-ansible.yaml
@@ -22,10 +22,20 @@ jobs:
install_args: --only ansible
checkout: false
+ - name: Cache Ansible dependencies
+ id: cache-ansible
+ uses: actions/cache@v4
+ with:
+ path: ansible/.ansible
+ key: ansible-${{ runner.os }}-${{ hashFiles('pyproject.toml', 'poetry.lock', 'ansible/roles/requirements.yml') }}
+
+ - name: Install Ansible Galaxy dependencies
+ run: cd ansible && ansible-galaxy install -r roles/requirements.yml
+
- name: Run ansible lint
run: |
cd ansible
# Remove any Vaulted files and Vault configuration
grep -R '$ANSIBLE_VAULT;' --files-with-matches . | xargs rm
sed --in-place '/vault_password_file/d' ansible.cfg
- ansible-lint
+ ansible-lint --exclude .ansible