Skip to content

Container-Driven-Development/ansible-playbook-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ansible Playbook Base docker image

Base docker image for 🎁 ansible playbooks

Usage

See ./example folder

  1. Creare own Dockerfile based on this docker image docker.io/devincan/ansible-playbook-base:v0.4
  2. Add your playbooks
  3. Build
  4. Run

Why?

  1. 🦾 Modern CI ready.
  2. 🏺 Caching - Ansible roles baked in docker image upfront.
  3. 🎑 Reproducible runs with same ansible, python libraries, roles, ansible.cfg, playbooks.
  4. βš—οΈ When you want to run playbooks on Windows

How does it work?

  1. Build docker image including everything needed for playbook to be executed ( Ansible, Python libraries, roles and playbooks )
  2. Run this docker image with mounted inventory.yml and id_rsa key from you local or CI
  3. Profit 🎩

What exaclty base image does?

  1. Setup ansible senzible defaults

  2. Add entrypoint.sh

    This entrypoint will copy baked roles, playbooks and other files from /ansible/baked to /ansible workdir. Then it will run site.yml playbook.

  3. Add essential Python/Ansible dependencies listed in requirements.txt