Parameter encapsulation for Docker role

This commit is contained in:
stack 2017-03-22 11:54:10 +00:00
parent cf5db1d59c
commit 2014888acc
3 changed files with 5 additions and 1 deletions

View File

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

View File

@ -20,3 +20,6 @@ docker_storage_thinpool_autoextend_threshold: 80
# Percentage by which to extend thin-provisioned docker storage volumes. # Percentage by which to extend thin-provisioned docker storage volumes.
docker_storage_thinpool_autoextend_percent: 20 docker_storage_thinpool_autoextend_percent: 20
# MTU to pass through to containers not using net=host
docker_daemon_mtu: 1500

View File

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