Sign inSign up

jefferyb/ansible

By jefferyb

•Updated over 7 years ago

An ansible image with git installed

Image
0

5.1K

jefferyb/ansible repository overview

⁠jefferyb/ansible

This is image contains git and ansible

⁠Tags:

⁠Volumes:

⁠For your playbooks
  • -v /playbooks
⁠For your ssh keys
  • -v /root/.ssh
⁠For configuration
  • -v /etc/ansible
⁠Working Directory
  • WORKDIR /playbooks

⁠Usage Examples:

⁠Ping for testing:
$ docker run --rm -it \
    -v $HOME/.ssh:/root/.ssh \
    -v $HOME/playbooks:/playbooks \
    -v $HOME/playbooks/hosts:/etc/ansible/hosts \
    jefferyb/ansible:xenial \
    ansible -u $USER remote_server -m ping
⁠Bash Command line:
$ docker run --rm -it \
    -v $HOME/.ssh:/root/.ssh \
    -v $HOME/playbooks:/playbooks \
    -v $HOME/playbooks/hosts:/etc/ansible/hosts \
    jefferyb/ansible:xenial bash

$ ansible -u username remote_server -m ping

and you can start using ansible as normal

⁠Useful hints:

Assuming your playbooks are located at $HOME/playbooks and your hosts file is located at $HOME/playbooks/hosts, then you can do:

$ alias ansible="docker run --rm -it -v $HOME/.ssh:/root/.ssh -v $HOME/playbooks:/playbooks -v $HOME/playbooks/hosts:/etc/ansible/hosts jefferyb/ansible:xenial ansible -u $USER"
$ ansible remote_server -m ping

Tag summary

Content type

Image

Digest

Size

114.9 MB

Last updated

over 7 years ago

docker pull jefferyb/ansible