Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antmelekhin/ansible-role-docker
An Ansible role to install and configure Docker Engine.
https://github.com/antmelekhin/ansible-role-docker
ansible ansible-role debian docker docker-engine fedora rhel ubuntu
Last synced: about 1 month ago
JSON representation
An Ansible role to install and configure Docker Engine.
- Host: GitHub
- URL: https://github.com/antmelekhin/ansible-role-docker
- Owner: antmelekhin
- License: mit
- Created: 2023-08-18T13:51:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-30T17:41:14.000Z (about 2 months ago)
- Last Synced: 2024-11-30T18:30:48.805Z (about 2 months ago)
- Topics: ansible, ansible-role, debian, docker, docker-engine, fedora, rhel, ubuntu
- Language: Jinja
- Homepage: https://galaxy.ansible.com/ui/standalone/roles/antmelekhin/docker/
- Size: 69.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Docker
======An Ansible role to install [Docker Engine](https://docs.docker.com/engine/) from the Docker repository and configure it.
Requirements
------------- Supported version of Ansible: 2.12 and higher. Systems with Python versions below than 3.7 are not compatible with ansible-core 2.17 (see [ansible/ansible#83357](https://github.com/ansible/ansible/issues/83357#issuecomment-2150254754)).
- Supported platforms:
- Debian
- 10
- 11
- 12
- Fedora
- 39
- 40
- RHEL
- 7
- 8
- 9
- Ubuntu
- 18.04
- 20.04
- 22.04Role Variables
--------------All variables that can be overridden are stored in the [defaults/main.yml](https://github.com/antmelekhin/ansible-role-docker/blob/main/defaults/main.yml) file.
Please refer to the [meta/argument_specs.yml](https://github.com/antmelekhin/ansible-role-docker/blob/main/meta/argument_specs.yml) file for a description of the available variables.
Similarly, descriptions and defaults for preset variables can be found in the [vars/main.yml](https://github.com/antmelekhin/ansible-role-docker/blob/main/vars/main.yml) file.Dependencies
------------None.
Example Playbook
----------------Install Docker Engine:
```yaml
---
- name: 'Install Docker Engine'
hosts: allroles:
- role: antmelekhin.docker
```Install Docker Engine and configure a DNS server for all Docker containers:
```yaml
---
- name: 'Install Docker Engine'
hosts: allroles:
- role: antmelekhin.docker
docker_daemon_options:
dns:
- '8.8.8.8'
dns-search:
- 'example.com'
```Install Docker Engine v23.0.6:
```yaml
---
- name: 'Install Docker Engine v23.0.6'
hosts: allroles:
- role: antmelekhin.docker
docker_version: '5:23.0.6-1~ubuntu.22.04~jammy'
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('22.04', '=')- role: antmelekhin.docker
docker_version: '23.0.6'
when: ansible_os_family == 'RedHat'
```License
-------MIT
Author Information
------------------Melekhin Anton.