diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-07-07 17:13:55 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-07-07 17:16:46 +0200 |
| commit | d3cb7d3f393a1a0088e2da57da500c93a0220459 (patch) | |
| tree | fffbfc46cbb1e33efa42a764cd3e024725010cf7 /molecule | |
| parent | 4d42a2b0950882bf63380a08c90007970c38b4ce (diff) | |
Add cgit role with testing of molecule service
Diffstat (limited to 'molecule')
| -rw-r--r-- | molecule/git/Dockerfile.j2 | 7 | ||||
| -rw-r--r-- | molecule/git/molecule.yml | 50 | ||||
| -rw-r--r-- | molecule/inventory.yml | 5 |
3 files changed, 62 insertions, 0 deletions
diff --git a/molecule/git/Dockerfile.j2 b/molecule/git/Dockerfile.j2 new file mode 100644 index 00000000..4db2119f --- /dev/null +++ b/molecule/git/Dockerfile.j2 @@ -0,0 +1,7 @@ +FROM docker.io/library/alpine:3.23 + +RUN apk add --no-cache python3 openrc \ + && mkdir -p /run/openrc \ + && touch /run/openrc/softlevel + +CMD ["/sbin/init"] diff --git a/molecule/git/molecule.yml b/molecule/git/molecule.yml new file mode 100644 index 00000000..3050dd01 --- /dev/null +++ b/molecule/git/molecule.yml @@ -0,0 +1,50 @@ +--- +role_name_check: 1 +dependency: + name: galaxy + options: + requirements-file: ../../requirements.yml + ignore-errors: true +driver: + name: podman +platforms: + - name: git + image: git + dockerfile: Dockerfile.j2 + platform: "linux/amd64" + pre_build_image: false + privileged: true + command: ${MOLECULE_COMMAND:-"/sbin/init"} + tmpfs: + "/tmp": "rw" + "/run": "rw,exec" + cgroupns_mode: host + +provisioner: + name: ansible + inventory: + links: + host_vars: "../../host_vars/" + group_vars: "../../group_vars/" + inventory: "../inventory.yml" + env: + ANSIBLE_ROLES_PATH: "../../roles" + config_options: + defaults: + callback_result_format: yaml + interpreter_python: /usr/bin/python3 + ssh_connection: + pipelining: true + playbooks: + converge: ../../service.yml +verifier: + name: ansible + +scenario: + test_sequence: + - destroy + - syntax + - create + - converge + - idempotence + - destroy diff --git a/molecule/inventory.yml b/molecule/inventory.yml index dc63becb..47eb69e4 100644 --- a/molecule/inventory.yml +++ b/molecule/inventory.yml @@ -7,3 +7,8 @@ homelab: proxmox: {} raspberrypi: {} ubuntu: {} + +containers: + hosts: + git.local: + ansible_host: git |
