9 - name: Install required packages
13 loop: "{{ packages[ansible_os_family] }}"
15 - name: Ensure /etc/docker exists
20 - name: Setup docker container logging settings
22 path: /etc/docker/daemon.json
23 key: '' # the whole JSON document per https://tools.ietf.org/html/rfc6901
24 # "value" must be wrapped in single quote "'" with extra space in front of "{" (ansible workaround)
25 # reference: https://stackoverflow.com/questions/31969872
26 value: ' { "log-driver": "json-file", "log-opts": { "max-size": "{{ docker.log_max_size }}", "max-file": "{{ docker.log_max_file }}" } }'
28 - name: Setup docker dns settings
30 path: /etc/docker/daemon.json
32 # "value" must be wrapped in single quote "'" with extra space in front of "[" (ansible workaround)
33 # reference: https://stackoverflow.com/questions/31969872
34 value: ' [ "{{ hostvars[groups.infrastructure[0]].cluster_ip }}" ]'
38 - name: Force notified handlers to run at this point
41 - name: Ensure docker is started