Merge branch 'docker'
This commit is contained in:
commit
caf8aa479e
3 changed files with 15 additions and 9 deletions
4
roles/docker/defaults/main.yml
Normal file
4
roles/docker/defaults/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
docker_compose_version: "1.25.4"
|
||||
docker_compose_path: /usr/local/bin/docker-compose
|
||||
docker_data_root: "/var/lib/docker"
|
||||
docker_storage_driver: "overlay2"
|
|
@ -45,16 +45,9 @@
|
|||
- python-docker
|
||||
|
||||
- name: Set docker configuration
|
||||
copy:
|
||||
template:
|
||||
src: templates/daemon.json.j2
|
||||
dest: /etc/docker/daemon.json
|
||||
content: |
|
||||
{
|
||||
"exec-opts": ["native.cgroupdriver=systemd"],
|
||||
"log-driver": "json-file",
|
||||
"log-opts": {
|
||||
"max-size": "100m"
|
||||
}
|
||||
}
|
||||
notify: restart docker
|
||||
|
||||
- name: Check current docker-compose version.
|
||||
|
|
9
roles/docker/templates/daemon.json.j2
Normal file
9
roles/docker/templates/daemon.json.j2
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"exec-opts": ["native.cgroupdriver=systemd"],
|
||||
"log-driver": "json-file",
|
||||
"log-opts": {
|
||||
"max-size": "100m"
|
||||
},
|
||||
"data-root": "{{ docker_data_root }}",
|
||||
"storage-driver": "{{ docker_storage_driver }}"
|
||||
}
|
Loading…
Reference in a new issue