Skip to content

Commit

Permalink
wip molecule
Browse files Browse the repository at this point in the history
  • Loading branch information
wookietreiber committed Jan 31, 2025
1 parent 84a6ff6 commit 36d5a47
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 165 deletions.
107 changes: 107 additions & 0 deletions .config/molecule/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---

dependency:
name: galaxy

driver:
name: docker

platforms:

- name: archlinux
image: carlodepieri/docker-archlinux-ansible:latest
command: ${MOLECULE_DOCKER_COMMAND:-""}
pre_build_image: yes
privileged: yes

- name: debian-buster
image: ghcr.io/hspaans/molecule-containers:debian-bullseye
command: /lib/systemd/systemd
pre_build_image: yes
privileged: yes
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
groups:
- nosudo

- name: debian-bullseye
image: ghcr.io/hspaans/molecule-containers:debian-bullseye
command: /lib/systemd/systemd
pre_build_image: yes
privileged: yes
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
groups:
- nosudo

- name: debian-bookworm
image: ghcr.io/hspaans/molecule-containers:debian-bookworm
command: /lib/systemd/systemd
pre_build_image: yes
privileged: yes
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
groups:
- nosudo

- name: rockylinux-9
image: ghcr.io/hspaans/molecule-containers:rockylinux-9
command: ${MOLECULE_DOCKER_COMMAND:-""}
pre_build_image: yes
privileged: yes
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
groups:
- nosudo

- name: ubuntu-focal
image: ghcr.io/hspaans/molecule-containers:ubuntu-focal
command: /lib/systemd/systemd
pre_build_image: yes
privileged: yes
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
groups:
- nosudo

- name: ubuntu-jammy
image: ghcr.io/hspaans/molecule-containers:ubuntu-jammy
command: /lib/systemd/systemd
pre_build_image: yes
privileged: yes
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
groups:
- nosudo

- name: ubuntu-noble
image: ghcr.io/hspaans/molecule-containers:ubuntu-noble
command: /lib/systemd/systemd
pre_build_image: yes
privileged: yes
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
groups:
- nosudo

provisioner:
name: ansible
inventory:
group_vars:
nosudo:
ansible_become_method: su
host_vars:
archlinux:
ansible_user: ansible

verifier:
name: ansible

...
8 changes: 5 additions & 3 deletions .github/workflows/ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ jobs:
matrix:
distro:
- archlinux
- centos-8
- rocky-8
- rocky-9
- debian-buster
- debian-bullseye
- debian-bookworm
- rockylinux-9
- ubuntu-focal
- ubuntu-jammy
- ubuntu-noble
scenario:
- default
- alternative
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ galaxy_info:

- name: EL
versions:
- '8'
- '9'

- name: Ubuntu
versions:
- focal
- jammy
- noble

galaxy_tags:
- keyboard
Expand Down
23 changes: 0 additions & 23 deletions molecule/alternative/converge.yml

This file was deleted.

71 changes: 2 additions & 69 deletions molecule/alternative/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,9 @@
---

dependency:
name: galaxy

driver:
name: docker

platforms:

- name: archlinux
image: carlodepieri/docker-archlinux-ansible:latest
command: ${MOLECULE_DOCKER_COMMAND:-""}
privileged: yes
pre_build_image: yes

- name: centos-8
image: geerlingguy/docker-centos8-ansible
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: yes
pre_build_image: yes

- name: rocky-8
image: geerlingguy/docker-rockylinux8-ansible
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: yes
pre_build_image: yes

- name: rocky-9
image: geerlingguy/docker-rockylinux9-ansible
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: yes
pre_build_image: yes

- name: ubuntu-focal
image: geerlingguy/docker-ubuntu2004-ansible
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: yes
pre_build_image: yes

- name: ubuntu-jammy
image: geerlingguy/docker-ubuntu2204-ansible
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: yes
pre_build_image: yes

provisioner:
name: ansible
playbooks:
converge: ../default/converge.yml
inventory:
group_vars:
all:
Expand All @@ -72,15 +15,5 @@ provisioner:
system_language: 'en_GB.UTF-8'
system_keymap: 'dvorak-programmer'
system_font: 'latarcyrheb-sun16'
host_vars:
archlinux:
ansible_user: ansible
centos-8:
system_language: 'en_GB.utf8'
rocky-8:
system_language: 'en_GB.utf8'

verifier:
name: ansible

...
69 changes: 0 additions & 69 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,3 @@
---

dependency:
name: galaxy

driver:
name: docker

platforms:

- name: archlinux
image: carlodepieri/docker-archlinux-ansible:latest
command: ${MOLECULE_DOCKER_COMMAND:-""}
privileged: yes
pre_build_image: yes

- name: centos-8
image: geerlingguy/docker-centos8-ansible
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: yes
pre_build_image: yes

- name: rocky-8
image: geerlingguy/docker-rockylinux8-ansible
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: yes
pre_build_image: yes

- name: rocky-9
image: geerlingguy/docker-rockylinux9-ansible
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: yes
pre_build_image: yes

- name: ubuntu-focal
image: geerlingguy/docker-ubuntu2004-ansible
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: yes
pre_build_image: yes

- name: ubuntu-jammy
image: geerlingguy/docker-ubuntu2204-ansible
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: yes
pre_build_image: yes

provisioner:
name: ansible
inventory:
host_vars:
archlinux:
ansible_user: ansible

verifier:
name: ansible

...
1 change: 1 addition & 0 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- name: check if localectl status works
ansible.builtin.command: localectl status
become: yes
changed_when: no
register: __locale_localectl_status

Expand Down

0 comments on commit 36d5a47

Please sign in to comment.