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-compose
|
||||
|
||||
- name: Set up Docker services
|
||||
import_tasks: services.yml
|
||||
- name: Set up Docker
|
||||
import_tasks: docker.yml
|
||||
tags:
|
||||
- reboot
|
||||
- services
|
||||
|
|
|
@ -1,22 +1,5 @@
|
|||
# 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
|
||||
file:
|
||||
name: "{{ base_volume }}"
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
filter:
|
||||
- ansible_mounts
|
||||
- ansible_swaptotal_mb
|
||||
when: reboot.rebooted
|
||||
when: not reboot.skipped and reboot.rebooted
|
||||
|
||||
- name: Clone apt-update-push
|
||||
git:
|
||||
|
|
Reference in a new issue