Sign inSign up

wurdum/ansible

By wurdum

Updated over 3 years ago

This image allows you to run Ansible from a container.

Image
0

1.2K

wurdum/ansible repository overview

Ansible

This image allows you to run Ansible from a container.

Build

docker build -t ansible:1.0.0 .

Run

Before running the container you need to be authenticated with the GitLab Container Registry.

Container has the following conventions:

  • To provide SSH key to access target hosts, use -v /path/to/key:/tmp/id_rsa
  • To provide password for Ansible Vault, use -v /path/to/password/file:/tmp/pass
  • To provide Ansible code, use -v /path/to/ansible/code:/ansible

Examples:

docker run --rm -it \
    -v "$(pwd):/ansible" \
    -v "/root/.ssh/secret_key:/tmp/id_rsa" \
    wurdum/ansible ansible all -m ping

docker run --rm -it \
    -v "$(pwd):/ansible" \
    -v "/root/.ssh/secret_key:/tmp/id_rsa" \
    wurdum/ansible ansible-playbook ksqldb.yml

docker run --rm -it \
    -v "$(pwd):/ansible" \
    -v "$(pwd)/.vault-pass:/tmp/pass" \
    -v "/root/.ssh/secret_key:/tmp/id_rsa" \
    wurdum/ansible ansible-playbook lt.yml

Tag summary

Content type

Image

Digest

sha256:4cf6a3dcf

Size

227.8 MB

Last updated

over 3 years ago

docker pull wurdum/ansible