More lint and fixes
This commit is contained in:
parent
54728a8acb
commit
db1210697d
21
roles/docker/tasks/docker.yml
Normal file
21
roles/docker/tasks/docker.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# vim: ft=yaml.ansible
|
||||||
|
---
|
||||||
|
- name: Copy Docker daemon config file
|
||||||
|
template:
|
||||||
|
src: daemon.json.j2
|
||||||
|
dest: /etc/docker/daemon.json
|
||||||
|
owner: root
|
||||||
|
mode: u=rw,g=r,o=r
|
||||||
|
register: daemon_config
|
||||||
|
|
||||||
|
- name: (Disable and) start Docker daemon
|
||||||
|
service:
|
||||||
|
name: "{{ item }}"
|
||||||
|
enabled: false
|
||||||
|
state: "{{ 'restarted' if daemon_config.changed else 'started' }}"
|
||||||
|
loop:
|
||||||
|
- docker.socket
|
||||||
|
- docker.service
|
||||||
|
|
||||||
|
- name: Set up Docker services
|
||||||
|
import_tasks: services.yml
|
|
@ -37,8 +37,8 @@
|
||||||
- docker
|
- docker
|
||||||
- docker-compose
|
- docker-compose
|
||||||
|
|
||||||
- name: Set up Docker services
|
- name: Set up Docker
|
||||||
import_tasks: services.yml
|
import_tasks: docker.yml
|
||||||
tags:
|
tags:
|
||||||
- reboot
|
- reboot
|
||||||
- services
|
- services
|
||||||
|
|
|
@ -1,22 +1,5 @@
|
||||||
# vim: ft=yaml.ansible
|
# vim: ft=yaml.ansible
|
||||||
---
|
---
|
||||||
- name: Copy Docker daemon config file
|
|
||||||
template:
|
|
||||||
src: daemon.json.j2
|
|
||||||
dest: /etc/docker/daemon.json
|
|
||||||
owner: root
|
|
||||||
mode: u=rw,g=r,o=r
|
|
||||||
register: daemon_config
|
|
||||||
|
|
||||||
- name: (Disable and) start Docker daemon
|
|
||||||
service:
|
|
||||||
name: "{{ item }}"
|
|
||||||
enabled: false
|
|
||||||
state: "{{ 'restarted' if daemon_config.changed else 'started' }}"
|
|
||||||
loop:
|
|
||||||
- docker.socket
|
|
||||||
- docker.service
|
|
||||||
|
|
||||||
- name: Create base directory for Docker volumes
|
- name: Create base directory for Docker volumes
|
||||||
file:
|
file:
|
||||||
name: "{{ base_volume }}"
|
name: "{{ base_volume }}"
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
filter:
|
filter:
|
||||||
- ansible_mounts
|
- ansible_mounts
|
||||||
- ansible_swaptotal_mb
|
- ansible_swaptotal_mb
|
||||||
when: reboot.rebooted
|
when: not reboot.skipped and reboot.rebooted
|
||||||
|
|
||||||
- name: Clone apt-update-push
|
- name: Clone apt-update-push
|
||||||
git:
|
git:
|
||||||
|
|
Reference in a new issue