All posts
Guides

Ansible Execution Environments – Dependency Management

No more "it works on my machine". Here's how to use Execution Environments to run Ansible identically everywhere.

Ansible Execution Environments – Dependency Management

It has always been tricky to keep the Ansible environment consistent for developers, in pipelines, in AWX, and on standalone nodes. Python libraries, roles, collections, and system packages – everything needs to align.

The Problem

Manual pip install here and there, "it works on my machine" all the way. Roles that install dependencies on every run – slow and fragile.

The Solution: Execution Environments

An EE is a container image with:

  • The correct Python version
  • The correct Ansible version
  • All collections
  • All system packages

ansible-builder builds the image from a definition. Then you run ansible-navigator or AWX against the EE – the exact same environment everywhere.

Example execution-environment.yml

YAML
version: 3images:  base_image:    name: quay.io/ansible/ansible-runner:latestdependencies:  galaxy: requirements.yml  python: requirements.txt  system: bindep.txt

The Benefits

  • Reproducible execution.
  • Faster runs – dependencies are already present.
  • Easier to update Ansible without breaking customer playbooks.

Read more in Ansible's official documentation or contact us and we'll show you how we use it in real-world projects.

Share
SHEBANG – hashtag och utropstecken
LinkedIn X
Talk to us
Ronnie Qvist
Ronnie Qvist
Sales & customer relations · SHEBANG
Usually replies within a few hours

Automation, IaC or CI/CD? I'll connect you with a consultant who has built it before.

Reply same day
Right person, directly
No pitch
DevOps & automation

Want to get rid of the manual work?

Describe your workflows today, and we'll point out what's worth automating first and what it gives back.

We usually reply the same day. Never spam.