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
|
||||
|
||||
[![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
|
||||
|
||||
## Requirements
|
||||
|
||||
* Ansible >= 2.8
|
||||
* Debian Buster
|
||||
* Ansible >= 2.10
|
||||
* Debian Bullseye
|
||||
|
||||
## 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_advertise_addr` - listen address
|
||||
* `docker_join_token` - join token for slave node
|
||||
|
|
|
@ -5,12 +5,12 @@ galaxy_info:
|
|||
company: Artifaille
|
||||
description: Install docker and configure docker swarm
|
||||
license: Apache2
|
||||
min_ansible_version: 2.8
|
||||
min_ansible_version: 2.10
|
||||
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- buster
|
||||
- bullseye
|
||||
|
||||
galaxy_tags:
|
||||
- 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
|
||||
apt:
|
||||
name: docker-ce
|
||||
ansible.builtin.package:
|
||||
name: docker.io
|
||||
tags: docker
|
||||
|
||||
- name: enable and start service
|
||||
systemd:
|
||||
ansible.builtin.service:
|
||||
name: docker
|
||||
state: started
|
||||
tags: docker
|
||||
|
|
Loading…
Reference in a new issue