Ansible in Docker
This repository has been archived on 2026-05-07. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Shell 52.6%
  • Dockerfile 47.4%
Find a file
2026-05-06 21:49:19 +02:00
test docs: update references from gitlab.xarif.de to git.xarif.de 2026-05-06 21:49:19 +02:00
.gitlab-ci.yml fixed bash substring test 2018-11-13 19:30:56 +01:00
Dockerfile chore: optimize Dockerfile by consolidating RUN commands 2025-04-10 16:35:14 +02:00
README.md first commit 2016-05-31 19:20:07 +02:00
start.sh use new key for ssh testserver 2018-11-13 08:21:54 +01:00

Ansible

Run Ansible from this Docker container instead of installing Ansible on your machine. It uses Ansible from source and you can optionally choose the branch and version to execute.

Usage

  • If you deploy to localhost, you playbook must not override the localhost

Run

docker run -it --rm \
  -v "/path/to/ansible-artifacts":/ansible \
  -v "$(echo $HOME)/.ssh/id_rsa":/root/.ssh/id_rsa \
  --env "LOCAL_USER=$(whoami)" \
  thomass/ansible bash

Now you can execute you mounted playbooks under /ansible.

Configuration

You can configure you container by environment variables.

Variable Description
UPDATE_REPO Merge the latest commits to the Ansible repository
BRANCH The branch to use from the Ansible repository
VERSION The commit or tag to use from the Ansible repository
USE_THOMASS_REPO Instead of the official git repository use the one from https://github.com/ThomasSteinbach/ansible

Licence

The whole repository is licenced under BSD. Please mention following:

github.com/ThomasSteinbach (thomass at aikq.de)