2019-04-01 09:38:33 +00:00
|
|
|
---
|
2018-08-31 14:05:45 +00:00
|
|
|
## Uncomment this if you want to force overlay/overlay2 as docker storage driver
|
|
|
|
## Please note that overlay2 is only supported on newer kernels
|
2019-04-01 09:38:33 +00:00
|
|
|
# docker_storage_options: -s overlay2
|
2018-08-31 14:05:45 +00:00
|
|
|
|
2018-09-09 02:15:33 +00:00
|
|
|
## Enable docker_container_storage_setup, it will configure devicemapper driver on Centos7 or RedHat7.
|
|
|
|
docker_container_storage_setup: false
|
|
|
|
|
|
|
|
## It must be define a disk path for docker_container_storage_setup_devs.
|
|
|
|
## Otherwise docker-storage-setup will be executed incorrectly.
|
2019-04-01 09:38:33 +00:00
|
|
|
# docker_container_storage_setup_devs: /dev/vdb
|
2018-09-09 02:15:33 +00:00
|
|
|
|
2018-08-31 14:05:45 +00:00
|
|
|
## Uncomment this if you have more than 3 nameservers, then we'll only use the first 3.
|
2018-09-08 16:21:33 +00:00
|
|
|
docker_dns_servers_strict: false
|
2018-08-31 14:05:45 +00:00
|
|
|
|
|
|
|
# Path used to store Docker data
|
|
|
|
docker_daemon_graph: "/var/lib/docker"
|
|
|
|
|
|
|
|
## Used to set docker daemon iptables options to true
|
2018-09-08 16:21:33 +00:00
|
|
|
docker_iptables_enabled: "false"
|
|
|
|
|
|
|
|
# Docker log options
|
|
|
|
# Rotate container stderr/stdout logs at 50m and keep last 5
|
|
|
|
docker_log_opts: "--log-opt max-size=50m --log-opt max-file=5"
|
|
|
|
|
|
|
|
# define docker bin_dir
|
|
|
|
docker_bin_dir: "/usr/bin"
|
2018-08-31 14:05:45 +00:00
|
|
|
|
2018-11-16 10:33:23 +00:00
|
|
|
# keep docker packages after installation; speeds up repeated ansible provisioning runs when '1'
|
|
|
|
# kubespray deletes the docker package on each run, so caching the package makes sense
|
|
|
|
docker_rpm_keepcache: 0
|
|
|
|
|
2018-09-08 10:13:33 +00:00
|
|
|
## An obvious use case is allowing insecure-registry access to self hosted registries.
|
2018-11-05 23:22:16 +00:00
|
|
|
## Can be ipaddress and domain_name.
|
2018-09-08 10:13:33 +00:00
|
|
|
## example define 172.19.16.11 or mirror.registry.io
|
2019-04-01 09:38:33 +00:00
|
|
|
# docker_insecure_registries:
|
2018-09-08 10:13:33 +00:00
|
|
|
# - mirror.registry.io
|
|
|
|
# - 172.19.16.11
|
2018-09-08 16:21:33 +00:00
|
|
|
|
2018-09-08 17:20:48 +00:00
|
|
|
## Add other registry,example China registry mirror.
|
2019-04-01 09:38:33 +00:00
|
|
|
# docker_registry_mirrors:
|
2018-09-08 17:20:48 +00:00
|
|
|
# - https://registry.docker-cn.com
|
|
|
|
# - https://mirror.aliyuncs.com
|
|
|
|
|
2018-09-08 16:21:33 +00:00
|
|
|
## If non-empty will override default system MounFlags value.
|
|
|
|
## This option takes a mount propagation flag: shared, slave
|
|
|
|
## or private, which control whether mounts in the file system
|
|
|
|
## namespace set up for docker will receive or propagate mounts
|
|
|
|
## and unmounts. Leave empty for system default
|
2019-04-01 09:38:33 +00:00
|
|
|
# docker_mount_flags:
|
2018-09-08 16:21:33 +00:00
|
|
|
|
|
|
|
## A string of extra options to pass to the docker daemon.
|
|
|
|
## This string should be exactly as you wish it to appear.
|
2018-08-31 14:05:45 +00:00
|
|
|
docker_options: >-
|
2018-11-27 15:13:15 +00:00
|
|
|
{%- if docker_insecure_registries is defined %}
|
2018-09-10 10:05:49 +00:00
|
|
|
{{ docker_insecure_registries | map('regex_replace', '^(.*)$', '--insecure-registry=\1' ) | list | join(' ') }}
|
2018-09-08 16:21:33 +00:00
|
|
|
{%- endif %}
|
2018-11-27 15:13:15 +00:00
|
|
|
{% if docker_registry_mirrors is defined %}
|
2018-09-10 10:05:49 +00:00
|
|
|
{{ docker_registry_mirrors | map('regex_replace', '^(.*)$', '--registry-mirror=\1' ) | list | join(' ') }}
|
2018-09-08 17:20:48 +00:00
|
|
|
{%- endif %}
|
2018-12-20 08:58:21 +00:00
|
|
|
{%- if docker_version != "latest" and docker_version is version('17.05', '<') %}
|
2019-04-09 07:17:05 +00:00
|
|
|
--graph={{ docker_daemon_graph }} {% if ansible_os_family not in ["openSUSE Leap", "openSUSE Tumbleweed", "Suse"] %}{{ docker_log_opts }}{% endif %}
|
2018-11-27 15:13:15 +00:00
|
|
|
{%- else %}
|
2019-04-09 07:17:05 +00:00
|
|
|
--data-root={{ docker_daemon_graph }} {% if ansible_os_family not in ["openSUSE Leap", "openSUSE Tumbleweed", "Suse"] %}{{ docker_log_opts }}{% endif %}
|
2018-11-17 06:22:14 +00:00
|
|
|
{%- endif %}
|
2018-08-31 14:05:45 +00:00
|
|
|
{%- if ansible_architecture == "aarch64" and ansible_os_family == "RedHat" %}
|
|
|
|
--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current
|
|
|
|
--default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd
|
|
|
|
--userland-proxy-path=/usr/libexec/docker/docker-proxy-current --signature-verification=false
|
|
|
|
{%- endif -%}
|