mirror of
https://github.com/mrlesmithjr/ansible-manage-lvm.git
synced 2025-12-14 22:04:48 +03:00
enh: Add variable rescan_scsi_command
This commit is contained in:
@@ -55,13 +55,13 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: centos | rescanning for new disks
|
- name: centos | rescanning for new disks
|
||||||
command: /usr/bin/rescan-scsi-bus.sh
|
command: "{{ rescan_scsi_command }}"
|
||||||
become: true
|
become: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when: scsi_devices.stdout|length > 0
|
when: scsi_devices.stdout|length > 0
|
||||||
|
|
||||||
- name: centos | rescanning for resized disks
|
- name: centos | rescanning for resized disks
|
||||||
command: /usr/bin/rescan-scsi-bus.sh -s
|
command: "{{ rescan_scsi_command }} -s"
|
||||||
become: true
|
become: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when: scsi_devices.stdout|length > 0
|
when: scsi_devices.stdout|length > 0
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: debian | rescanning for new disks added
|
- name: debian | rescanning for new disks added
|
||||||
command: /sbin/rescan-scsi-bus
|
command: "{{ rescan_scsi_command }}"
|
||||||
become: true
|
become: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when: scsi_devices['stdout'] | length
|
when: scsi_devices['stdout'] | length
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
---
|
---
|
||||||
# tasks file for ansible-manage-lvm
|
# 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
|
- include_tasks: debian.yml
|
||||||
when: ansible_facts.os_family == "Debian"
|
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_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 }}
|
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"
|
||||||
|
|||||||
Reference in New Issue
Block a user