Merge pull request #86 from smutel/FixIssue85

Add variable rescan_scsi_command
This commit is contained in:
Larry Smith Jr
2022-04-26 09:30:50 -04:00
committed by GitHub
4 changed files with 12 additions and 3 deletions
+2 -2
View File
@@ -55,13 +55,13 @@
changed_when: false
- name: centos | rescanning for new disks
command: /usr/bin/rescan-scsi-bus.sh
command: "{{ rescan_scsi_command }}"
become: true
changed_when: false
when: scsi_devices.stdout|length > 0
- name: centos | rescanning for resized disks
command: /usr/bin/rescan-scsi-bus.sh -s
command: "{{ rescan_scsi_command }} -s"
become: true
changed_when: false
when: scsi_devices.stdout|length > 0
+1 -1
View File
@@ -34,7 +34,7 @@
changed_when: false
- name: debian | rescanning for new disks added
command: /sbin/rescan-scsi-bus
command: "{{ rescan_scsi_command }}"
become: true
changed_when: false
when: scsi_devices['stdout'] | length
+7
View File
@@ -1,5 +1,12 @@
---
# tasks file for ansible-manage-lvm
- name: Set rescan_scsi_command for old debian version
set_fact:
rescan_scsi_command: "/sbin/rescan-scsi-bus"
when:
- ansible_distribution | replace(' ','') | lower == 'debian'
- ansible_distribution_major_version is version(10, '<=')
- include_tasks: debian.yml
when: ansible_facts.os_family == "Debian"
+2
View File
@@ -3,3 +3,5 @@
ebsnvme_binary_helper_file: go-ebsnvme_{{ ebsnvme_binary_helper_ver }}_linux_amd64.tar.gz
ebsnvme_binary_helper_url: https://github.com/mvisonneau/go-ebsnvme/releases/download/{{ ebsnvme_binary_helper_ver }}/{{ ebsnvme_binary_helper_file }}
rescan_scsi_command: "/usr/bin/rescan-scsi-bus.sh"