marvinpinto.docker
Docker
This Ansible role allows users to install the latest version of Docker on an Ubuntu-like system. It also includes a useful function to check if the Docker daemon is running properly.
Requirements
This role is designed to work only on Ubuntu-like systems.
Role Variables
# Additional options for the Docker service
# 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
To install this role from Ansible Galaxy into the './roles' directory, use:
ansible-galaxy install marvinpinto.docker -p ./roles
You can use this role in a playbook like this:
- hosts: 'servers'
roles:
- role: 'marvinpinto.docker'
become: true
tasks:
- name: 'Check if the Docker daemon is working'
become: true
docker_ping:
retries: 5
delay: 10
until: result|success
- name: 'Run Hello World container'
docker:
name: 'helloworld'
image: 'hello-world'
state: 'started'
Informazioni sul progetto
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.
Installa
ansible-galaxy install marvinpinto.docker
Licenza
mit
Download
187k
Proprietario
Computer nerd.