docker_compose_install - corrections from original copy

Use python 3, don't hardwire docker version, etc.
This commit is contained in:
Nick Stokoe
2020-11-29 15:18:36 +00:00
parent 4be8345f39
commit 38c2667d2d
2 changed files with 19 additions and 5 deletions

View File

@@ -7,9 +7,10 @@
docker_compose_install_apt_key_uri: https://download.docker.com/linux/ubuntu/gpg docker_compose_install_apt_key_uri: https://download.docker.com/linux/ubuntu/gpg
# The docker apt repo config line # The docker apt repo config line
docker_compose_install_apt_repo: deb https://download.docker.com/linux/ubuntu bionic stable docker_compose_install_apt_repo: deb https://download.docker.com/linux/ubuntu {{ansible_lsb.codename}} stable
# This needs to be supplied externally.
# Get this version from https://github.com/docker/compose/releases/ # Get this version from https://github.com/docker/compose/releases/
# Check compatibility with docker. # Check compatibility with docker.
docker_compose_install_compose_verion: 1.22.0 #docker_compose_install_compose_version:

View File

@@ -7,10 +7,10 @@
- apt-transport-https - apt-transport-https
- ca-certificates - ca-certificates
- software-properties-common - software-properties-common
- python-pip - python3-pip
- virtualenv - virtualenv
- python-setuptools - python3-setuptools
- python-docker - python3-docker
- name: add docker repository key - name: add docker repository key
apt_key: apt_key:
@@ -38,6 +38,19 @@
name: name:
- docker-compose - docker-compose
- name: docker daemon configuration
copy:
dest: /etc/docker/daemon.json
content: |-
{
"log-driver": "json-file",
"log-opts": {
"max-size": "30m"
}
}
notify:
- restart docker daemon
- name: enable docker - name: enable docker
service: service:
name: docker name: docker