enh: Add variable rescan_scsi_command
This commit is contained in:
parent
1f966d2ea1
commit
6e74c9714e
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue