Skip to content

Commit

Permalink
Merge pull request #158 from cisagov/improvement/systemd-enabled
Browse files Browse the repository at this point in the history
Add SystemD-enabled molecule scenario
  • Loading branch information
mcdonnnj authored Sep 19, 2023
2 parents ca157c9 + a6e2949 commit 1855af6
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ jobs:
matrix:
scenario:
- default
- systemd_enabled
steps:
- id: harden-runner
name: Harden the runner
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ repos:
hooks:
- id: bandit
# Bandit complains about the use of assert() in tests
exclude: molecule/default/tests
exclude: molecule/(default|systemd_enabled)/tests
args:
- --config=.bandit.yml
- repo: https://github.com/psf/black-pre-commit-mirror
Expand Down
1 change: 1 addition & 0 deletions molecule/systemd_enabled/INSTALL.rst
1 change: 1 addition & 0 deletions molecule/systemd_enabled/converge.yml
1 change: 1 addition & 0 deletions molecule/systemd_enabled/molecule-no-systemd.yml
1 change: 1 addition & 0 deletions molecule/systemd_enabled/molecule-with-systemd.yml
97 changes: 97 additions & 0 deletions molecule/systemd_enabled/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
# This molecule configuration file is suitable for testing Ansible
# roles that _do_ require SystemD. If your Ansible role _does not_
# require SystemD then you should use molecule-no-systemd.yml instead.
#
# Note that the molecule configuration file that is symlinked to
# molecule.yml is the one that will be used.
dependency:
name: galaxy
driver:
name: docker
platforms:
- cgroupns_mode: host
command: /lib/systemd/systemd
image: geerlingguy/docker-amazonlinux2023-ansible:latest
name: amazonlinux2023-systemd
platform: amd64
pre_build_image: yes
privileged: yes
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- cgroupns_mode: host
command: /lib/systemd/systemd
image: geerlingguy/docker-debian10-ansible:latest
name: debian10-systemd
platform: amd64
pre_build_image: yes
privileged: yes
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- cgroupns_mode: host
command: /lib/systemd/systemd
image: geerlingguy/docker-debian11-ansible:latest
name: debian11-systemd
platform: amd64
pre_build_image: yes
privileged: yes
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- cgroupns_mode: host
command: /lib/systemd/systemd
image: cisagov/docker-debian12-ansible:latest
name: debian12-systemd
platform: amd64
pre_build_image: yes
privileged: yes
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- cgroupns_mode: host
command: /lib/systemd/systemd
image: cisagov/docker-kali-ansible:latest
name: kali-systemd
platform: amd64
pre_build_image: yes
privileged: yes
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- cgroupns_mode: host
command: /lib/systemd/systemd
image: geerlingguy/docker-fedora37-ansible:latest
name: fedora37-systemd
platform: amd64
pre_build_image: yes
privileged: yes
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- cgroupns_mode: host
command: /lib/systemd/systemd
image: geerlingguy/docker-fedora38-ansible:latest
name: fedora38-systemd
platform: amd64
pre_build_image: yes
privileged: yes
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- cgroupns_mode: host
command: /lib/systemd/systemd
image: geerlingguy/docker-ubuntu2004-ansible:latest
name: ubuntu-20-systemd
platform: amd64
pre_build_image: yes
privileged: yes
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- cgroupns_mode: host
command: /lib/systemd/systemd
image: geerlingguy/docker-ubuntu2204-ansible:latest
name: ubuntu-22-systemd
platform: amd64
pre_build_image: yes
privileged: yes
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
scenario:
name: systemd_enabled
verifier:
name: testinfra
1 change: 1 addition & 0 deletions molecule/systemd_enabled/prepare.yml
1 change: 1 addition & 0 deletions molecule/systemd_enabled/requirements.yml
1 change: 1 addition & 0 deletions molecule/systemd_enabled/tests/test_default.py
1 change: 1 addition & 0 deletions molecule/systemd_enabled/upgrade.yml

0 comments on commit 1855af6

Please sign in to comment.