Add Ansible CI workflow and provisioning test inventory #12
Workflow file for this run
This file contains 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: Ansible CI | |
on: | |
pull_request: | |
paths: | |
- "provisioning/**" | |
- ".github/workflows/ansible.yml" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install Ansible | |
run: | | |
python -m pip install --upgrade pip | |
pip install ansible | |
- name: Initialize the project | |
run: make init | |
- name: Run Ansible playbook | |
run: | | |
cd provisioning | |
ansible-playbook --diff -i test image/ansible/playbooks.yml --skip-tags nodejs,exclude_for_test -e 'allinone=True' | |
- name: Run Ansible playbook in check mode | |
run: | | |
cd provisioning | |
ansible-playbook --check --diff -i test image/ansible/playbooks.yml --skip-tags nodejs,exclude_for_test -e 'allinone=True' |