-
Notifications
You must be signed in to change notification settings - Fork 149
/
Copy pathmain.yml
58 lines (46 loc) · 1.39 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
# Variables setup
- name: Include os-specific variables.
include_vars: "{{ ansible_os_family }}.yml"
# Makes sure that the repo cache is fresh
- name: Update APT cache.
apt:
update_cache: true
when: ansible_os_family == 'Debian'
changed_when: false
# Install python-pip
- include_tasks: setup-python-pip.yml
# Install docker-py
- include_tasks: setup-docker-py.yml
when: not skip_docker_py
# Install docker-compose
- include_tasks: setup-docker-compose.yml
when: not skip_docker_compose
# Install the Docker repository
- include_tasks: "repo-{{ ansible_os_family }}.yml"
when: not skip_repo
# Install the Docker dependencies
- name: Install Docker dependencies.
package:
name: "{{ docker_dependencies }}"
state: present
when: not skip_containerd or not skip_engine
# Install containerd
- include_tasks: setup-containerd.yml
when: not skip_containerd
# Install the Docker Engine
- include_tasks: setup-docker-engine.yml
when: not skip_engine
# Install the Docker CLI
- include_tasks: setup-docker-cli.yml
when: not skip_cli
# Setup the Docker Swarm Cluster
- block:
- include_tasks: setup-swarm-cluster.yml
- include_tasks: setup-swarm-labels.yml
- include_tasks: setup-docker-swarm-api-certs.yml
when: not skip_swarm_cert
when: not skip_swarm
# Adds the Docker admin users to the Docker group
- include_tasks: setup-docker-group.yml
when: not skip_group