Skip to content

Commit

Permalink
switch from diodonfrost container to my own
Browse files Browse the repository at this point in the history
  • Loading branch information
bodsch committed Apr 10, 2022
1 parent 919642a commit 5b36706
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 18 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ jobs:
fail-fast: false
matrix:
image:
- debian:9
- debian:10
- debian:11
- ubuntu:18.04
- ubuntu:20.04
python-version:
- '3.9'
ansible-version:
- '3.4.0'
- '4.1.0'
- '5.1.0'

steps:
Expand Down Expand Up @@ -93,7 +91,7 @@ jobs:
python-version:
- '3.9'
ansible-version:
- '3.4.0'
- '4.1.0'
- '5.1.0'

steps:
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
export TOX_SCENARIO ?= default
export TOX_PYTHON ?= py310
export TOX_ANSIBLE ?= ansible510

.PHONY: converge destroy verify lint

default: converge

converge:
@hooks/converge

destroy:
@hooks/destroy

verify:
@hooks/verify

lint:
@hooks/lint
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Tested on
- Debian 10 / 11
- Ubuntu 20.10
* RedHat based
- CentOS 8 (**not longer supported**)
- Alma Linux 8
- Rocky Linux 8
- Oracle Linux 8
Expand Down
10 changes: 10 additions & 0 deletions hooks/converge
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

TOX_ARGS=

if [ -n "${TOX_SCENARIO}" ]
then
TOX_ARGS="--scenario-name ${TOX_SCENARIO}"
fi

tox -e ${TOX_PYTHON}-${TOX_ANSIBLE} -- molecule converge ${TOX_ARGS}
10 changes: 10 additions & 0 deletions hooks/destroy
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

TOX_ARGS=

if [ -n "${TOX_SCENARIO}" ]
then
TOX_ARGS="--scenario-name ${TOX_SCENARIO}"
fi

tox -e ${TOX_PYTHON}-${TOX_ANSIBLE} -- molecule destroy ${TOX_ARGS}
10 changes: 10 additions & 0 deletions hooks/lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

TOX_ARGS=

if [ -n "${TOX_SCENARIO}" ]
then
TOX_ARGS="--scenario-name ${TOX_SCENARIO}"
fi

tox -e ${TOX_PYTHON}-${TOX_ANSIBLE} -- molecule lint ${TOX_ARGS}
10 changes: 10 additions & 0 deletions hooks/verify
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

TOX_ARGS=

if [ -n "${TOX_SCENARIO}" ]
then
TOX_ARGS="--scenario-name ${TOX_SCENARIO}"
fi

tox -e ${TOX_PYTHON}-${TOX_ANSIBLE} -- molecule verify ${TOX_ARGS}
17 changes: 7 additions & 10 deletions meta/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,23 @@ galaxy_info:

author: Bodo Schulz
description: ansible role for handling snapd

license: "BSD"
min_ansible_version: 2.9

platforms:
- name: Ubuntu
versions:
# 18.04
- bionic
# 20.04
- focal
- name: Debian
versions:
# 9
- etch
# 10
- buster
- bullseye
- name: Ubuntu
versions:
# 20.04
- focal
- name: EL
versions:
- 7
- 8
- name: ArchLinux

galaxy_tags: []

Expand Down
3 changes: 2 additions & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lint: |
platforms:
- name: instance
image: "diodonfrost/ansible-${DISTRIBUTION:-debian:10}"
image: "bodsch/ansible-${DISTRIBUTION:-debian:11}"
command: ${MOLECULE_DOCKER_COMMAND:-""}
docker_host: "${DOCKER_HOST:-unix://run/docker.sock}"
privileged: true
Expand All @@ -30,6 +30,7 @@ provisioner:
defaults:
deprecation_warnings: True
stdout_callback: yaml
callbacks_enabled: profile_tasks

scenario:
test_sequence:
Expand Down
4 changes: 2 additions & 2 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ansible-lint==5.4.0
molecule==3.4.0
molecule-docker==0.2.4
molecule==3.6.1
molecule-docker==1.1.0
docker==5.0.0
yamllint==1.26.3
flake8==3.9.2
Expand Down

0 comments on commit 5b36706

Please sign in to comment.