ansible-alpine-host/tasks/docker.yml

18 lines
449 B
YAML
Raw Normal View History

2022-04-10 00:29:22 +00:00
---
2022-06-19 05:45:45 +00:00
# TODO: Use a BTRFS subvolume instead?
- name: "Mount encrypted partition to /srv."
shell: "mount /srv"
args:
creates: "/srv/docker"
2022-04-10 00:29:22 +00:00
- name: "Prepare /srv to encrypt Docker files."
file:
state: "directory"
path: "{{ item }}"
loop:
- "/srv/docker"
- "/var/lib/docker"
- name: "Bind mount /srv/docker to /var/lib/docker."
2022-06-19 05:45:45 +00:00
shell: "mount /var/lib/docker"
2022-04-10 00:29:22 +00:00
- name: "Start Docker service."
shell: "/etc/init.d/docker start"