Public | Automated Build

Last pushed: 4 days ago
Short Description
Simple container do create a unified ansible environment.
Full Description

hg8496/ansible

Features

  • Based on Alpine Linux.
  • Bundled with openssh

Usage

Direct call with mapped volumes

To map the ssh-agent into docker do:

docker run --rm -ti -v $SSH_AUTH_SOCK:/auth_sock -e SSH_AUTH_SOCK=/auth_sock -v /ansible/infrastructure:/infra hg8496/ansible ansible -u USER all -m ping

Create own image

With all your ansible infrastructure under ./infra write the following Dockerfile
Dockerfile

FROM hg8496/ansible

COPY infra /infra

then docker build --force-rm -t ansible . to build your image.

Execute with sudo docker run --rm -ti -v $SSH_AUTH_SOCK:/auth_sock -e SSH_AUTH_SOCK=/auth_sock ansible ansible -u USER all -m ping

Docker Pull Command
Owner
hg8496
Source Repository