How do you run playbooks in CI with the same EE that production uses?
IntermediateProductionTesting, CI/CD and Quality
Answer
Use ansible-navigator with the EE image, so CI, laptops and AWX all execute with identical ansible-core, collections and Python libraries.
ansible-navigator run playbooks/site.yml \
-i inventories/staging \
--eei registry.example.com/ee-platform:1.8.0 \
--pull-policy missing \
--mode stdout \
--check --diff
Commit an ansible-navigator.yml with the image and settings so nobody has to remember the flags. Alternatively run the EE image directly as the CI job container and call ansible-playbook inside it. Either way, the image tag in CI must match the one in the AWX job template.
More on Testing, CI/CD and Quality
What does a testing pyramid look like for Ansible code?BeginnerHow do you roll out `ansible-lint` profiles across a team without blocking everyone?IntermediateWhen do you use `skip_list`, `warn_list` and `# noqa`?IntermediateHow do you set up pre-commit hooks for an Ansible repo?BeginnerHow is a Molecule scenario laid out, and what does `molecule test` actually run?IntermediateDocker, Podman or real VMs as the Molecule driver: how do you choose?Advanced