-
Notifications
You must be signed in to change notification settings - Fork 26
39 lines (31 loc) · 1.07 KB
/
ansible-validate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
name: Ansible Validate
on: [push]
jobs:
validate:
# Run the test inside a centos8 container
runs-on: ubuntu-latest
container: centos:centos8
steps:
- uses: actions/checkout@v2
# Make pip3 work
- name: Install Dependencies yum
run: |
yum install -y python3 python3-pip python3-setuptools
# Install requirements and latest ansible
- name: Install Dependencies pip
run: |
pip3 install cryptography==3.3.2
pip3 install wheel ansible
pip3 install -r requirements.txt
# Validate all inventory files in the repo
- name: Run Terrible validation
run: |
for inventory in $(find . -iname "inventory*.yml"); do
echo "VALIDATE $inventory ******************************************************************"
echo "ansible-playbook -i $inventory -u root main.yml --tags validate"
ansible-playbook -i $inventory -u root main.yml --tags validate
done
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'