initial import from social-coop

This commit is contained in:
Nick Stokoe
2020-11-29 12:39:02 +00:00
commit 56fa50ec69
7 changed files with 169 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
---
## Installs docker-CE
# Following guide from here:
# https://docs.docker.com/install/linux/docker-ce/ubuntu/#set-up-the-repository
# The docker apt repo key uri
docker_compose_install_apt_key_uri: https://download.docker.com/linux/ubuntu/gpg
# The docker apt repo config line
docker_compose_install_apt_repo: deb https://download.docker.com/linux/ubuntu bionic stable
# Get this version from https://github.com/docker/compose/releases/
# Check compatibility with docker.
docker_compose_install_compose_verion: 1.22.0

View File

@@ -0,0 +1,45 @@
---
- name: install prereqs (apt)
apt:
update_cache: true
name:
- apt-transport-https
- ca-certificates
- software-properties-common
- python-pip
- virtualenv
- python-setuptools
- python-docker
- name: add docker repository key
apt_key:
url: "{{ docker_compose_install_apt_key_uri }}"
state: present
- name: add docker repository
apt_repository:
repo: "{{ docker_compose_install_apt_repo }}"
filename: docker-ce
state: present
update_cache: true
- name: install docker-ce
apt:
name:
- docker-ce
# Oddly, there is no docker-compose PPA, the suggested linux install
# method is to download a binary. See:
# https://docs.docker.com/compose/install/#master-builds
- name: install docker-compose
pip:
name:
- docker-compose
- name: enable docker
service:
name: docker
state: started
enabled: yes