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: workflow_dispatch:
jobs: 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: molecule:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -21,3 +44,6 @@ jobs:
- name: molecule - 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 - name: Converge
hosts: localhost hosts: localhost
connection: local connection: local
become: yes
gather_facts: yes
roles: roles:
- role: ipr-cnrs.nftables - role: ipr-cnrs.nftables
nft_debug: true nft_debug: true

View File

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