-
Notifications
You must be signed in to change notification settings - Fork 149
/
Copy pathmain.yml
176 lines (134 loc) · 5.05 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
---
# Repository to be used for the installation of the packages
docker_repo: "{{ docker_repo_ce_stable }}"
##
# Docker
##
# Name of the package providing Docker
docker_package_name: "docker-ce"
# Version of the Docker package to be installed.
# By default, the latest available version will be installed.
docker_package_version: ""
# Installation state of the Docker package.
# Set it to 'latest' to upgrade Docker to the latest version.
docker_package_state: present
# Extra packages that have to be installed together with Docker
# e.g. linux-image-extra-virtual on some Debian systems
docker_dependencies: "{{ default_docker_dependencies }}"
# Contect written to the systemd unit drop-in overriding
# the default Docker service definition.
docker_service_override: ""
# docker_service_override: |
# [Service]
# ExecStart=
# ExecStart=/usr/bin/dockerd
# State of the Docker deamon service
docker_service_state: "started"
# Whether the Docker service should start on boot
docker_service_enabled: "yes"
# Docker Deamon configuration
docker_daemon_config: {}
##
# Docker API cert
##
# Generate new cert on groups['docker_swarm_manager'][0]
docker_api_certs_cert_gen: False
# Base dir docker
docker_api_certs_docker_base_path: /etc/docker
# Base dir for cert.pem key.pem ca.pem (used for deamon.json)
docker_api_certs_docker_cert_path: "{{ docker_api_certs_docker_base_path }}/cert"
# used for deamon.json
docker_api_certs_ca_name: ca.pem
docker_api_certs_cert_name: cert.pem
docker_api_certs_key_name: key.pem
# Openssl config for generate CA
docker_api_certs_openssl_domain: swarm.localdomain.local
docker_api_certs_openssl_state: Ile-de-France
docker_api_certs_openssl_country: FR
docker_api_certs_openssl_email: docker@localhost
docker_api_certs_openssl_org: My ORG
docker_api_certs_openssl_ou: My OU
docker_api_certs_docker_certificate_validity: 365
##
# Docker CLI
##
# Name of the package providing the Docker CLI
docker_cli_package_name: "docker-ce-cli"
# Version of the Docker CLI package to be installed.
docker_cli_package_version: ""
# Installation state of the Docker CLI package.
# Set it to 'latest' to upgrade the Docker CLI to the latest version.
docker_cli_package_state: present
##
# Containerd
##
# Name of the package providing containerd
containerd_package_name: "containerd.io"
# Version of the containerd package to be installed.
# By default, the latest available version will be installed.
containerd_package_version: ""
# Installation state of the containerd package.
# Set it to 'latest' to upgrade containerd to the latest version.
containerd_package_state: present
# Contect written to the systemd unit drop-in overriding
# the default containerd service definition.
containerd_service_override: |
[Service]
ExecStartPre=
# State of the containerd service
containerd_service_state: "started"
# Whether the containerd service should start on boot
containerd_service_enabled: "yes"
##
# Docker Compose
##
# Version of the docker-compose package to be installed.
# By default, the latest available version will be installed.
docker_compose_version: ""
##
# Docker-py
##
# Name of the python-pip package providing docker-py
docker_py_package_name: "docker"
# Version of the docker-py package to be installed.
docker_py_package_version: ""
# Installation state of the docker-py package.
# Set it to 'latest' to upgrade the Docker CLI to the latest version.
docker_py_package_state: present
##
# Docker Users
##
# Name of the Docker group
docker_group_name: "docker"
# List of the users in the Docker group
docker_group_users:
- "{{ ansible_user | default(ansible_user_id) }}" # if ansible_user is not defined, we default to the ansible ansible_user_id fact
##
# Docker Swarm
##
# Docker swarm network can be define in order to be sure that
# swarm cluster doesn't overlap with you infrastructure
# docker_swarm_network: 10.10.8.0/24
# Custom swarm init args. ex: customize default-addr-pool
# docker_swarm_init_extra_options: |
# --default-addr-pool 10.184.32.0/19 \
# --default-addr-pool-mask-length 28
docker_swarm_init_extra_options: ""
# You can set any interface, that is listened by docker engine.
# e.g. docker_swarm_interface: "eth1"
docker_swarm_interface: "{{ ansible_default_ipv4['interface'] }}"
docker_swarm_addr: "{{ hostvars[inventory_hostname]['ansible_' + docker_swarm_interface]['ipv4']['address'] }}"
docker_swarm_port: 2377
##
# Role Switches
##
# Switches disabling the docker-engine, docker group and swarm-mode setup.
skip_repo: false # if true, skips the setup of the docker repository
skip_containerd: false # if true, skips the setup of containerd
skip_engine: false # if true, skips the docker engine installation
skip_cli: false # if true, skips the docker cli installation
skip_swarm: false # if true, skips the swarm setup
skip_swarm_cert: false # if true, skips the swarm cert gen and deploy
skip_group: false # if true, does not add the docker_admin_users to the docker_group_name
skip_docker_py: false # if true, skips the installation of docker-py
skip_docker_compose: false # if true, skips the installation of docker-compose