Fix docker MTU configuration when no MTU specified

We'll omit the option and use Docker's default value.
This commit is contained in:
Mark Goddard 2017-07-26 17:51:15 +00:00
parent d638402838
commit 4751a96cc5
2 changed files with 3 additions and 1 deletions

View File

@ -3,4 +3,4 @@
hosts: docker
roles:
- role: docker
docker_daemon_mtu: "{{ external_net_name | net_mtu }}"
docker_daemon_mtu: "{{ external_net_name | net_mtu | default }}"

View File

@ -1,6 +1,8 @@
{
"storage-driver": "devicemapper",
{% if docker_daemon_mtu %}
"mtu": {{ docker_daemon_mtu }},
{% endif %}
"storage-opts": [
"dm.thinpooldev=/dev/mapper/{{ docker_storage_volume_group | replace('-', '--') }}-{{ docker_storage_volume_thinpool | replace('-', '--') }}",
"dm.use_deferred_removal=true",