tomfordweb / ansible-control

Ansible control in a docker image

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is an ansible control machine based on an Ubuntu 20 image.

It contains a few extra ansible galaxy modules:

  • community.general
  • community.docker

Use it

You can use this image with either docker, or docker-compose.

docker

Here is an example passing the local machines ssh-agent to the container to use your private key.

SSH_AUTH_SOCK=/ssh-agent
docker run -it -v $(pwd):/ansible -v $SSH_AUTH_SOCK:/ssh-agent tomfordweb/ansible-control bash

docker-compose

version: "3.7"

services: 
  ansible:
    image: tomfordweb/ansible-control
    container_name: ansible
    volumes:
      - ./:/ansible
      - $SSH_AUTH_SOCK:/ssh-agent
    environment:
      SSH_AUTH_SOCK: /ssh-agent
docker-compose run ansible bash

About

Ansible control in a docker image

License:Apache License 2.0


Languages

Language:Dockerfile 100.0%