35 lines
738 B
YAML
35 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
|