homeserver/playbooks/3_service/docker.yml

37 lines
979 B
YAML
Raw Normal View History

2020-08-18 11:57:53 +02:00
---
- hosts: docker
pre_tasks:
- name: create pv + vg for docker
become: true
community.general.lvg:
vg: vg_docker
pvs: /dev/sdb
state: present
- name: create lv for docker
become: true
community.general.lvol:
state: present
vg: vg_docker
lv: lv_docker
size: +100%FREE
- name: create fs on lv
become: true
community.general.filesystem:
fstype: xfs
dev: /dev/mapper/vg_docker-lv_docker
- name: mount lv
become: true
ansible.posix.mount:
path: /var/lib/docker
src: /dev/mapper/vg_docker-lv_docker
state: mounted
fstype: xfs
boot: yes
2020-08-18 11:57:53 +02:00
roles:
- { role: geerlingguy.pip, tags: "pip", become: true }
- { role: geerlingguy.docker, tags: "docker", become: true }
- { role: gantsign.ctop, tags: "ctop", become: true }
- { role: mgrote.docker-compose-deploy, tags: "compose", become: true }