feat: use docker.io package
This commit is contained in:
parent
864ac528d8
commit
839324e191
3 changed files with 8 additions and 31 deletions
|
@ -1,16 +1,16 @@
|
||||||
# Ansible role: Docker Swarm
|
# Ansible role: Docker Swarm
|
||||||
|
|
||||||
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://framagit.org/artifaille/ansible-role-docker/blob/master/LICENSE)
|
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://framagit.org/artifaille/ansible-role-docker/blob/master/LICENSE)
|
||||||
|
|
||||||
Install and configure docker with swarm
|
Install and configure docker with swarm
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
* Ansible >= 2.8
|
* Ansible >= 2.10
|
||||||
* Debian Buster
|
* Debian Bullseye
|
||||||
|
|
||||||
## Role variables
|
## Role variables
|
||||||
|
|
||||||
* `docker_repo_distribution` - set the distribution for docker repository (default: `ansible_distribution_release`)
|
|
||||||
* `docker_swarm_manager` - set the cluster role (default: `false`)
|
* `docker_swarm_manager` - set the cluster role (default: `false`)
|
||||||
* `docker_advertise_addr` - listen address
|
* `docker_advertise_addr` - listen address
|
||||||
* `docker_join_token` - join token for slave node
|
* `docker_join_token` - join token for slave node
|
||||||
|
|
|
@ -5,12 +5,12 @@ galaxy_info:
|
||||||
company: Artifaille
|
company: Artifaille
|
||||||
description: Install docker and configure docker swarm
|
description: Install docker and configure docker swarm
|
||||||
license: Apache2
|
license: Apache2
|
||||||
min_ansible_version: 2.8
|
min_ansible_version: 2.10
|
||||||
|
|
||||||
platforms:
|
platforms:
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
- buster
|
- bullseye
|
||||||
|
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
|
@ -1,34 +1,11 @@
|
||||||
---
|
---
|
||||||
- name: install dependencies packages
|
|
||||||
apt:
|
|
||||||
name: '{{ packages }}'
|
|
||||||
vars:
|
|
||||||
packages:
|
|
||||||
- apt-transport-https
|
|
||||||
- ca-certificates
|
|
||||||
- gnupg2
|
|
||||||
- software-properties-common
|
|
||||||
- python3-docker
|
|
||||||
- python-docker
|
|
||||||
tags: docker
|
|
||||||
|
|
||||||
- name: add gpg key for docker repository
|
|
||||||
apt_key:
|
|
||||||
url: https://download.docker.com/linux/debian/gpg
|
|
||||||
tags: docker
|
|
||||||
|
|
||||||
- name: add docker repository
|
|
||||||
apt_repository:
|
|
||||||
repo: 'deb https://download.docker.com/linux/debian {{ docker_repo_distribution }} stable'
|
|
||||||
tags: docker
|
|
||||||
|
|
||||||
- name: install docker package
|
- name: install docker package
|
||||||
apt:
|
ansible.builtin.package:
|
||||||
name: docker-ce
|
name: docker.io
|
||||||
tags: docker
|
tags: docker
|
||||||
|
|
||||||
- name: enable and start service
|
- name: enable and start service
|
||||||
systemd:
|
ansible.builtin.service:
|
||||||
name: docker
|
name: docker
|
||||||
state: started
|
state: started
|
||||||
tags: docker
|
tags: docker
|
||||||
|
|
Loading…
Reference in a new issue