--- # Runs on the repository's own runner (label kamino-molecule), in the molecule-ubuntu2404 # (MOLECULE_IMAGE) and molecule-ubuntu2604 (MOLECULE_IMAGE_2604) images, pinned in # .gitea/workflows/molecule.yml. Needs the Ubuntu mirrors: the role installs nfs-common. The # containers run systemd as PID 1 with a writable cgroup, so a daemon-reload builds mount units # from /etc/fstab; no privileged mode. Nothing is ever mounted: the server below does not exist. driver: name: docker platforms: - name: ${KAMINO_RUN_ID:-local}-nfs-client-noble labels: net.rkdr.mortis.molecule-run: "${KAMINO_RUN_ID:-local}" image: ${MOLECULE_IMAGE} pre_build_image: true pull: true command: /sbin/init cgroupns_mode: host volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw tmpfs: - /run - /run/lock security_opts: - apparmor=unconfined - name: ${KAMINO_RUN_ID:-local}-nfs-client-resolute labels: net.rkdr.mortis.molecule-run: "${KAMINO_RUN_ID:-local}" image: ${MOLECULE_IMAGE_2604} pre_build_image: true pull: true command: /sbin/init cgroupns_mode: host volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw tmpfs: - /run - /run/lock security_opts: - apparmor=unconfined provisioner: name: ansible # One source for every play, so the converge and the plays in verify.yml start from the same # valid input: a default-options mount, one with its own options, one to remove (prepare.yml # seeds its line), and /mnt/data, whose seeded line has another server and must be replaced. inventory: group_vars: all: nfs_client_mounts: - src: nas.example:/export/data path: /mnt/data - src: nas.example:/export/media path: /mnt/media opts: _netdev,nofail,ro,vers=4.2 - src: nas.example:/export/old path: /mnt/old state: absent verifier: name: ansible scenario: # molecule's default sequence minus both destroys (scripts/run_molecule_scenarios.sh removes the # containers as soon as this scenario ends; after a local run, run `molecule destroy` yourself), # plus a check before the converge (fresh host) and one after it (configured host). test_sequence: - dependency - cleanup - syntax - create - prepare - check - converge - check - idempotence - side_effect - verify - cleanup