homeserver/roles/mrlesmithjr.ansible-manage-lvm/tasks/debian.yml
mg 169abbedff LVM Konfiguration für docker mit neuer Rolle umgesetzt (#363)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#363
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
2022-05-17 12:05:45 +02:00

40 lines
847 B
YAML

---
- name: debian | Updating Apt Cache
apt:
update_cache: true
cache_valid_time: 3600
become: true
- 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