The Runner that runs the playbooks and workflows of an AnsibleForms controller, written in Go. It joins the controller and runs each job it is handed in a container of its own, on Docker, Podman or Kubernetes.
The AnsibleForms Installer sets it up: run it on a Linux server and choose the Runner role.
curl -fsSL https://ansibleforms.com/install | shThe controller decides what runs and where; the Runner runs it, each job apart, and keeps nothing it does not need.
- Two ways to join: dials the controller, or is dialed by it when it can be reached
- Joins with a token: a join token approves it at once, else an admin approves it
- A container per job: each job runs in a fresh container of
RTE_IMAGE, removed once it ends - Docker, Podman or Kubernetes: through their API, a pod per job on Kubernetes
- Runs ansible-core: every playbook, with its inventory, credentials, limit and extra vars
- Live output: every line reaches the controller's job as it runs, its secrets masked
- Pause and resume: a playbook holds before its next task, or starts again from its checkpoints
- Survives a restart: a restarted Runner finds its jobs' containers and reads on where it stopped
- Survives a drop: what the controller did not store yet is sent again after a reconnect
- One small binary: no Node.js, no Python: the jobs' image brings ansible-core
The controller hands each job to a Runner, its files and credentials sealed for it, and the Runner runs it in a container of its own. It writes the job on the container's stdin and reads its output from the container's logs: nothing is shared on the network or a disk, and aborting a job just stops its container. A pause or a resume reaches the job on its stdin on Kubernetes, and through an exec of the Runner's control command on Docker and Podman.
A Runner joins its controller in one of two modes (RTE_MODE):
| Mode | How it joins |
|---|---|
outbound (default) |
It dials the controller: no port to open on the Runner's side |
inbound |
The controller dials it, for a Runner the controller can reach |
The Runner's reference lives on ansibleforms.com, with the rest of the AnsibleForms documentation:
| Page | What it covers |
|---|---|
| The installer | Installing a Runner with the installer's Runner role |
| Docker | Running it by hand with docker run, or as a Docker Compose service |
| Podman | Running it on Podman, rootful or rootless |
| Kubernetes with Helm | Installing it with the AnsibleForms chart's runner mode |
| Host folders in the jobs | RTE_JOB_MOUNTS on Docker and Podman, and PYTHONPATH |
| An image per job | The image a job runs in, RTE_IMAGES_ALLOWED and registry logins |
| Kubernetes | A pod per job, its Role (deploy/kubernetes-rbac.yaml) and its pod |
| The Runner's volumes | RTE_JOB_MOUNTS on Kubernetes: claims, secrets and configMaps |
| Settings | Every environment variable it reads, and its default |
Contributions are welcome. Start with these files:
- CONTRIBUTING.md: how to build and test it, the socket contract, and how it is released
- CHANGELOG.md: the changes in every release
- SECURITY.md: how to report a security issue