forked from ComplianceAsCode/content
-
Notifications
You must be signed in to change notification settings - Fork 0
25 lines (25 loc) · 1.06 KB
/
gate-lint-ansible-roles.yaml
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
name: Gate (AR / RHEL)
on:
pull_request:
branches: [ 'master' ]
jobs:
validate-fedora-ar:
name: Build, Lint Ansible Roles on Fedora Latest (Container)
runs-on: ubuntu-latest
container:
image: fedora:latest
steps:
- name: Install Deps
run: dnf install -y cmake make ninja-build openscap-utils python3-pyyaml python3-setuptools python3-jinja2 python3-pygithub ansible ansible-lint expat libxslt
- name: Checkout
uses: actions/checkout@v2
- name: Configure
run: cmake -DSSG_PRODUCT_DEFAULT=OFF -DSSG_PRODUCT_RHEL7=ON -DSSG_PRODUCT_RHEL8=ON -G Ninja ..
working-directory: ./build
- name: Build
run: ninja -j2 rhel8-profile-playbooks rhel7-profile-playbooks
working-directory: ./build
- name: Build Ansible Roles
run: PYTHONPATH=. python3 utils/ansible_playbook_to_role.py --build-playbooks-dir ./build/ansible/ --dry-run ./build/ansible_roles
- name: Lint Ansible Roles
run: ansible-lint -x 204 -x experimental -x command-instead-of-module ./build/ansible_roles/*