Interview Prep/Ansible/Performance, Testing and CI/CD

You need to confirm a role runs on both Ubuntu 22.04 and Rocky 9.

IntermediateScenarioPerformance, Testing and CI/CD
Answer

Situation read → Multi-platform testing.

What I'd do → Add platforms to molecule.yml and pass the image via env var so CI can matrix it.

platforms:
  - name: instance
    image: "${MOLECULE_DISTRO:-ubuntu2404}"

In CI run a job matrix over ubuntu2204, rockylinux9.

Why → Parallel CI jobs per distro keep wall time low.

Interview tip → Use images with systemd for service tests.

All Ansible questions Roadmap: Ansible

More on Performance, Testing and CI/CD