mg
b158fcee65
Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#339 Co-authored-by: mg <michael.grote@posteo.de> Co-committed-by: mg <michael.grote@posteo.de>
36 lines
979 B
YAML
36 lines
979 B
YAML
---
|
|
- 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
|
|
|
|
|
|
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 }
|