2020-08-18 11:57:53 +02:00
|
|
|
---
|
2022-03-08 16:55:05 +01:00
|
|
|
- hosts: docker
|
2022-03-06 14:10:30 +01:00
|
|
|
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 }
|
2021-07-16 12:38:15 +02:00
|
|
|
- { role: mgrote.docker-compose-deploy, tags: "compose", become: true }
|