Skip to content

gikoluo/ansible-role-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

avinetworks.docker

Build Status Ansible Galaxy

This role provides the following:

  • Installation of Docker following Docker-Engine install procedures as documented by Docker.
  • It will manage kernel versions as well, verifying the that the correct kernel for Docker support is installed.

Supports the following Operating Systems:

  • CentOS 6
  • CentOS 7
  • RedHat 6
  • RedHat 7
  • Fedora 24
  • Fedora 23
  • OracleLinux 6
  • OracleLinux 7
  • Ubuntu 12.04
  • Ubuntu 14.04
  • Ubuntu 16.04

CentOs 6 is not tested yes for config

Requirements

This role requires Ansible 2.0.0 or higher. Requirements are listed in the metadata file.

Role Variables

Variable Required Default Choices Comments
storage_driver No None
  • devicemapper
  • aufs
The name of the storage driver for docker.
block_device No None
  • /dev/sda3, etc.
The device name used for the storage driver.
docker_group_members No None
  • username, etc.
The user, except root, who wants to operation the docker and container. root is not suggested to used as an operation user.
daemon_settings No None
  • daemon settings.
The Daemon settings for docker start. for chinese user, it is suggested to add a registy, see ex below.

Example Playbook

Install docker to your machine.

- hosts: servers
  roles:
     - role: avinetworks.docker
       storage_driver: devicemapper
       block_device: /dev/sda3
       docker_group_members:
         - "ops"
       daemon_settings:
          registry-mirrors:
            - "http://99c6e2d5.m.daocloud.io"
          hosts:
            - "tcp://0.0.0.0:2375"
            - "unix:///var/run/docker.sock"

License

MIT

Author Information

Eric Anderson

About

Ansible Role for deploying docker-engine to hosts

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •