Add github action #7
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 | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install ansible | |
run: | | |
sudo apt install software-properties-common | |
sudo add-apt-repository --yes --update ppa:ansible/ansible | |
sudo apt install ansible | |
# Check syntax for all ansible playbooks | |
- name: Validate all playbooks | |
run: ansible-playbook ansible/*.yml --syntax-check |