Last fixes + install Compose v2 plugin
This commit is contained in:
parent
15fa5d6215
commit
85e1da3cbf
|
@ -1,21 +1,31 @@
|
||||||
# vim: ft=yaml.ansible
|
# vim: ft=yaml.ansible
|
||||||
---
|
---
|
||||||
- name: add docker gpg key
|
- name: Add Docker PGP key
|
||||||
apt_key:
|
apt_key:
|
||||||
keyserver: pgp.mit.edu
|
keyserver: pgp.mit.edu
|
||||||
id: 8D81803C0EBFCD88
|
id: 8D81803C0EBFCD88
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: add docker apt repository
|
- name: Add Docker apt repository
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: deb https://download.docker.com/linux/ubuntu bionic stable
|
repo: deb https://download.docker.com/linux/ubuntu bionic stable
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: install docker-ce
|
- name: Install Docker
|
||||||
apt:
|
apt:
|
||||||
name: docker-ce
|
name: "{{ pkgs }}"
|
||||||
state: present
|
state: present
|
||||||
|
vars:
|
||||||
|
pkgs:
|
||||||
|
- docker-ce
|
||||||
|
- docker-compose-plugin
|
||||||
|
|
||||||
|
- name: Create docker-compose symlink
|
||||||
|
ansible.builtin.file:
|
||||||
|
name: /usr/local/bin/docker-compose
|
||||||
|
src: /usr/libexec/docker/cli-plugins/docker-compose
|
||||||
|
state: link
|
||||||
|
|
||||||
- name: Configure cron job to prune unused Docker data weekly
|
- name: Configure cron job to prune unused Docker data weekly
|
||||||
cron:
|
cron:
|
||||||
|
@ -26,12 +36,15 @@
|
||||||
user: root
|
user: root
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: create folder structure for bind mounts
|
- name: Create folder structure for bind mounts
|
||||||
file:
|
file:
|
||||||
name: "{{ volume_root_folder }}"
|
name: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
loop:
|
||||||
|
- "{{ volume_root_folder }}"
|
||||||
|
- "{{ volume_website_folder }}"
|
||||||
|
|
||||||
- name: setup services
|
- name: Set up services
|
||||||
import_tasks: services.yml
|
import_tasks: services.yml
|
||||||
tags:
|
tags:
|
||||||
- setup_services
|
- setup_services
|
||||||
|
|
Loading…
Reference in a new issue