You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
3.1 KiB

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