Addo ssh_keys #1088
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate Ansible playbooks | |
| on: | |
| push: | |
| paths: | |
| - ".github/**" | |
| - "ansible/**" | |
| - "ansible.cfg" | |
| - "requirements/development.txt" | |
| env: | |
| ANSIBLE_ASK_VAULT_PASS: False | |
| ENVIRONMENT: testing | |
| jobs: | |
| ansible-lint: | |
| name: Lint Ansible playbooks | |
| runs-on: ubuntu-latest | |
| container: python:3.9-bullseye | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4.1.7 | |
| - name: Virtualenv caching | |
| uses: actions/cache@v4.0.2 | |
| with: | |
| path: ~/venv/current | |
| key: ${{ runner.os }}-python3.9-venv-v1-${{ hashFiles('**/requirements/development.txt') }}-${{ hashFiles('**/requirements/production.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-python3.9-venv-v1-${{ hashFiles('**/requirements/development.txt') }}-${{ hashFiles('**/requirements/production.txt') }} | |
| ${{ runner.os }}-python3.9-venv-v1-${{ hashFiles('**/requirements/development.txt') }}- | |
| ${{ runner.os }}-python3.9-venv-v1- | |
| - name: Install Python dependencies | |
| uses: mobolic/install-python-dependencies@v0.3.0 | |
| with: | |
| virtualenv-location: "~/venv/current" | |
| - name: Run ansible-lint | |
| run: | | |
| bash -c "source ~/venv/current/bin/activate && | |
| ansible-lint ansible/" | |
| ansible-test: | |
| name: Test Ansible playbooks | |
| needs: ansible-lint | |
| runs-on: ubuntu-latest | |
| container: python:3.9-bullseye | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4.1.7 | |
| - name: Virtualenv caching | |
| uses: actions/cache@v4.0.2 | |
| with: | |
| path: ~/venv/current | |
| key: ${{ runner.os }}-python3.9-venv-v1-${{ hashFiles('**/requirements/development.txt') }}-${{ hashFiles('**/requirements/production.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-python3.9-venv-v1-${{ hashFiles('**/requirements/development.txt') }}-${{ hashFiles('**/requirements/production.txt') }} | |
| ${{ runner.os }}-python3.9-venv-v1-${{ hashFiles('**/requirements/development.txt') }}- | |
| ${{ runner.os }}-python3.9-venv-v1- | |
| - name: Install Python dependencies | |
| uses: mobolic/install-python-dependencies@v0.3.0 | |
| with: | |
| virtualenv-location: "~/venv/current" | |
| - name: Run Ansible testing tasks | |
| run: ~/venv/current/bin/ansible-playbook -i ansible/hosts -l testing --connection=local --tags testing ansible/testing.yml |