Skip to content

marvinpinto/ansible-role-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker

Build Status Ansible Galaxy License

This Ansible role enables people to install the latest Docker on an Ubuntu-like system. It also provides a handy library function to validate that the Docker daemon is running and functional.

Requirements

This role will only work on an Ubuntu-like system.

Role Variables

# Any additional docker service options
# Example: '--dns 8.8.8.8 --dns 8.8.4.4 --userns-remap=default'
# docker_additional_service_opts: |
#   {
#     "userns-remap": "default",
#     "dns": [
#       "8.8.8.8",
#       "8.8.4.4"
#     ]
#   }
docker_additional_service_opts: |
  {}

Examples

Install this module from Ansible Galaxy into the './roles' directory:

ansible-galaxy install marvinpinto.docker -p ./roles

Use it in a playbook as follows:

- hosts: 'servers'
  roles:
    - role: 'marvinpinto.docker'
      become: true
  tasks:
    - name: 'Ensure that the docker daemon is functional'
      become: true
      docker_ping:
      retries: 5
      delay: 10
      until: result|success
    - name: 'hello world'
      docker:
        name: 'helloworld'
        image: 'hello-world'
        state: 'started'

About

Ansible Galaxy role to install and manage Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages