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.

69 lines
2.9 KiB

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