Merge pull request #73 from mnasiadka/mnasiadka/nvme_only

centos: Skip SCSI tasks on NVMe only hosts
This commit is contained in:
Larry Smith Jr
2022-01-04 14:47:16 -05:00
committed by GitHub
+16
View File
@@ -34,6 +34,20 @@
- lv.1.create is defined - lv.1.create is defined
- lv.1.create|bool - lv.1.create|bool
- name: centos | check for scsi adapters
find:
paths: "/sys/class/scsi_host"
file_type: any
become: true
register: scsi_adapters
- block:
- name: centos | installing sg3_utils
package:
name: sg3_utils
state: present
become: true
- name: centos | checking for scsi devices - name: centos | checking for scsi devices
command: sg_scan command: sg_scan
become: true become: true
@@ -51,3 +65,5 @@
become: true become: true
changed_when: false changed_when: false
when: scsi_devices.stdout|length > 0 when: scsi_devices.stdout|length > 0
when: scsi_adapters.matched > 0