Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

pyslackers/ansible-role-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyslackers.docker

Ansible role to install and run docker containers/services.

Role Variables

  • docker_containers: Dict of docker containers to run (with container name as key).

    • image: Image to run
    • Most parameters of the docker_container ansible module are supported.
  • docker_services: Dict of docker services to run with compose (the key is used as project_name).

    • Most parameters of the docker_service ansible module are supported

Example Playbook

- hosts: localhost
  vars:
    docker_containers:
      nginx:
        image: nginx
        ports: 80:80
    docker_services:
      nginx:
        definition:
          version: '2'
          services:
            web:
              image: nginx
              ports:
                - 81:80
  roles: 
    - pyslackers.docker

License

MIT

Releases

No releases published

Packages

No packages published