Add docker role

This commit is contained in:
Alexandre Iooss 2019-07-22 10:32:01 +02:00
parent 9018c69da3
commit 66d870ce36
No known key found for this signature in database
GPG key ID: 6C79278F3FCDCC02
3 changed files with 51 additions and 0 deletions

1
hosts
View file

@ -27,6 +27,7 @@ re2o-db.adm.auro.re
serge.adm.auro.re serge.adm.auro.re
passbolt.adm.auro.re passbolt.adm.auro.re
vpn-ovh.adm.auro.re vpn-ovh.adm.auro.re
docker-ovh.adm.auro.re
[ovh-testing-vm] [ovh-testing-vm]
re2o-test.adm.auro.re re2o-test.adm.auro.re

View file

@ -0,0 +1,45 @@
---
# Install HTTPS support for APT
- name: Install apt-transport-https
apt:
update_cache: true
name:
- apt-transport-https
- ca-certificates
- curl
- gnupg2
- software-properties-common
state: present
register: apt_result
retries: 3
until: apt_result is succeeded
# Add the key
- name: Configure the apt key
apt_key:
url: https://download.docker.com/linux/debian/gpg
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
state: present
register: apt_key_result
retries: 3
until: apt_key_result is succeeded
# Add the repository into source list
- name: Configure unifi repository
apt_repository:
repo: "{{ item }}"
state: present
loop:
- deb https://download.docker.com/linux/debian buster stable
- name: Install docker
apt:
update_cache: true
name:
- docker-ce
- docker-ce-cli
- containerd.io
state: present
register: apt_result
retries: 3
until: apt_result is succeeded

5
services_web.yml Normal file
View file

@ -0,0 +1,5 @@
---
# Deploy Docker hosts
- hosts: docker-ovh.adm.auro.re
roles:
- docker