name: Ansible Lint

on:
  push:
    paths:
      - 'infra/ansible/**'
  pull_request:
    paths:
      - 'infra/ansible/**'

jobs:
  lint:
    runs-on: self-hosted
    steps:
      - uses: actions/checkout@v4

      - name: Install ansible-lint
        run: pip install ansible-lint

      - name: Run ansible-lint
        run: ansible-lint infra/ansible/playbooks/
        working-directory: ${{ github.workspace }}
