initial import from social-coop
This commit is contained in:
15
roles/docker-install/defaults/main.yml
Normal file
15
roles/docker-install/defaults/main.yml
Normal 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
|
||||
|
||||
45
roles/docker-install/tasks/main.yml
Normal file
45
roles/docker-install/tasks/main.yml
Normal 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
|
||||
Reference in New Issue
Block a user