Use robertdebock/molecule-action

This commit is contained in:
Paweł Krawczyk 2021-08-07 23:29:36 +01:00
parent da74b7d2b1
commit 06fecc68b2
No known key found for this signature in database
GPG Key ID: 32AF1F39C4EE03F2
6 changed files with 35 additions and 37 deletions

View File

@ -10,6 +10,29 @@ on:
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- name: molecule
uses: robertdebock/molecule-action@2.6.16
with:
command: lint
test:
needs:
- lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- image: centos
tag: latest
- image: debian
tag: latest
molecule:
runs-on: ubuntu-latest
steps:
@ -20,4 +43,7 @@ jobs:
path: "${{ github.repository }}"
- name: molecule
uses: robertdebock/molecule-action@2.6.17
uses: robertdebock/molecule-action@2.6.17
with:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}

View File

@ -1,9 +0,0 @@
---
- name: Converge
hosts: localhost
connection: local
roles:
- role: ipr-cnrs.nftables
nft_debug: true
# can't remove iptables on an instance with docker
nft_old_pkg_manage: false

View File

@ -1,15 +0,0 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: instance
image: jrei/systemd-debian:latest
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
provisioner:
name: ansible
verifier:
name: ansible

View File

@ -1,10 +0,0 @@
---
# This is an example playbook to execute Ansible tests.
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Example assertion
assert:
that: true

View File

@ -2,6 +2,8 @@
- name: Converge
hosts: localhost
connection: local
become: yes
gather_facts: yes
roles:
- role: ipr-cnrs.nftables
nft_debug: true

View File

@ -1,11 +1,15 @@
---
dependency:
name: galaxy
lint: |
set -e
yamllint .
ansible-lint
driver:
name: docker
platforms:
- name: instance
image: centos/systemd:latest
- name: "nftables-${image:-debian}-${tag:-latest}"
image: "${image:-debian}:${tag:-latest}"
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro