base__ssh_listen_mesh_only binds sshd to the live wt0 IP only, with
ip_nonlocal_bind to beat the post-boot bind race and a fail-closed assert so an
unresolved address never silently listens on all interfaces. Molecule covers
the render + sysctl. Mesh-hardening 1/3 (ADR-016/021).
Environmental checkpoint applied: the molecule-debian13 container image lacks
procps (no sysctl binary). Added molecule/default/prepare.yml to install procps
and sysctls: {net.ipv4.ip_nonlocal_bind: "0"} to molecule.yml platform so the
ansible.posix.sysctl task can write and read back the value hermetically.
Sysctl file format is net.ipv4.ip_nonlocal_bind=1 (no spaces); verify.yml
grep pattern updated to match ansible.posix.sysctl's actual output.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
36 lines
1 KiB
YAML
36 lines
1 KiB
YAML
---
|
|
dependency:
|
|
name: galaxy
|
|
options:
|
|
requirements-file: ../../requirements.yml
|
|
|
|
driver:
|
|
name: docker
|
|
|
|
platforms:
|
|
- name: instance
|
|
# Project-owned image built from .docker/molecule-debian13/Dockerfile
|
|
# and hosted in the Forgejo container registry.
|
|
# Build/push with: make molecule-image / make molecule-image-push
|
|
image: forgejo.nyumbani.baobab.band/sjat/molecule-debian13:latest
|
|
pre_build_image: true
|
|
privileged: true # required for systemd
|
|
cgroupns_mode: host
|
|
volumes:
|
|
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
|
command: /lib/systemd/systemd
|
|
# Pre-create the namespaced sysctl so ansible.posix.sysctl can set it (mesh-hardening 1/3).
|
|
# The container image lacks procps so the sysctl binary is absent; we also install it in
|
|
# prepare.yml. This entry ensures the value exists in the container's netns at startup.
|
|
sysctls:
|
|
net.ipv4.ip_nonlocal_bind: "0"
|
|
|
|
provisioner:
|
|
name: ansible
|
|
inventory:
|
|
host_vars:
|
|
instance:
|
|
ansible_user: root
|
|
|
|
verifier:
|
|
name: ansible
|