Ansible Role docker_provision
Role Variables
TODO
Example Playbook
Inventory example
[containers]
apollo image="qnimbus/ansible-ubuntu:20.04"
ares image="qnimbus/ansible-ubuntu:20.04"
Playbook example
---
- name: Bring up docker containers using Docker connection
hosts: localhost
roles:
- role: docker_provision
docker_provision_privileged: true,
docker_provision_inventory_group: "{{ groups['containers'] }}"
docker_provision_use_docker_connection: true
- hosts: containers
tasks:
- name: Ensure containers are online
ping:
Or using a dynamic inventory
---
- name: Bring up docker containers using Docker connection
hosts: localhost
vars:
inventory:
- name: apollo
- name: ares
image: 'qnimbus/ansible-ubuntu:20.04'
- name: hera
image: 'qnimbus/ansible-ubuntu:20.04'
roles:
- { role: docker_provision, docker_provision_privileged: true, docker_provision_inventory: '{{ inventory }}' }