homeserver/roles/mrlesmithjr.ansible-manage-lvm/tasks/debian.yml
mg 192cb2a1ef Aufbau NextCloud (#362)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#362
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
2022-05-22 21:12:36 +02:00

34 lines
738 B
YAML

---
- name: debian | installing pre-reqs
apt:
name:
- lvm2
- scsitools
state: present
become: true
- name: debian | install xfs tools
apt:
name: xfsprogs
state: present
become: true
loop: "{{ lvm_groups|subelements('lvnames') }}"
when:
- item.1 is defined
- item.1 != 'None'
- item.1.filesystem is defined
- item.1.filesystem == "xfs"
- item.1.create is defined
- item.1.create|bool
- name: debian | checking for scsi devices
command: sg_scan
become: true
register: scsi_devices
changed_when: false
- name: debian | rescanning for new disks added
command: "{{ rescan_scsi_command }}"
become: true
changed_when: false
when: scsi_devices['stdout'] | length