Browse Source
Merge pull request #2876 from neith00/docker_iptables
parametrized iptables options for docker daemon
pull/2893/head
Andreas Krüger
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
7 additions and
1 deletions
-
inventory/sample/group_vars/k8s-cluster.yml
-
roles/docker/defaults/main.yml
-
roles/docker/templates/docker-options.conf.j2
|
@ -140,6 +140,9 @@ dns_domain: "{{ cluster_name }}" |
|
|
# Path used to store Docker data |
|
|
# Path used to store Docker data |
|
|
docker_daemon_graph: "/var/lib/docker" |
|
|
docker_daemon_graph: "/var/lib/docker" |
|
|
|
|
|
|
|
|
|
|
|
## Used to set docker daemon iptables options to true |
|
|
|
|
|
#docker_iptables_enabled: "true" |
|
|
|
|
|
|
|
|
## A string of extra options to pass to the docker daemon. |
|
|
## A string of extra options to pass to the docker daemon. |
|
|
## This string should be exactly as you wish it to appear. |
|
|
## This string should be exactly as you wish it to appear. |
|
|
## An obvious use case is allowing insecure-registry access |
|
|
## An obvious use case is allowing insecure-registry access |
|
|
|
@ -40,3 +40,6 @@ dockerproject_rh_repo_base_url: 'https://yum.dockerproject.org/repo/main/centos/ |
|
|
dockerproject_rh_repo_gpgkey: 'https://yum.dockerproject.org/gpg' |
|
|
dockerproject_rh_repo_gpgkey: 'https://yum.dockerproject.org/gpg' |
|
|
dockerproject_apt_repo_base_url: 'https://apt.dockerproject.org/repo' |
|
|
dockerproject_apt_repo_base_url: 'https://apt.dockerproject.org/repo' |
|
|
dockerproject_apt_repo_gpgkey: 'https://apt.dockerproject.org/gpg' |
|
|
dockerproject_apt_repo_gpgkey: 'https://apt.dockerproject.org/gpg' |
|
|
|
|
|
|
|
|
|
|
|
# Used to set docker daemon iptables options |
|
|
|
|
|
docker_iptables_enabled: "false" |
|
@ -1,5 +1,5 @@ |
|
|
[Service] |
|
|
[Service] |
|
|
Environment="DOCKER_OPTS={{ docker_options|default('') }} --iptables=false" |
|
|
|
|
|
|
|
|
Environment="DOCKER_OPTS={{ docker_options|default('') }} --iptables={{ docker_iptables_enabled | default('false') }}" |
|
|
{% if docker_mount_flags is defined and docker_mount_flags != "" %} |
|
|
{% if docker_mount_flags is defined and docker_mount_flags != "" %} |
|
|
MountFlags={{ docker_mount_flags }} |
|
|
MountFlags={{ docker_mount_flags }} |
|
|
{% endif %} |
|
|
{% endif %} |