mirror of
https://github.com/mrlesmithjr/ansible-manage-lvm.git
synced 2026-09-07 16:08:20 +03:00
* Fix: follow best practice for pipe in shell command
This commit is contained in:
+10
-2
@@ -6,14 +6,22 @@
|
|||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: centos | check for nvme devices
|
- name: centos | check for nvme devices
|
||||||
shell: cat /proc/partitions |awk '{print $4}' | grep -q nvme. ; echo $?
|
shell: |
|
||||||
|
set -o pipefail
|
||||||
|
cat /proc/partitions | awk '{print $4}' | grep -q nvme. ; echo $?
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
register: blkdev_nvme
|
register: blkdev_nvme
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: centos | check for amazon ebs devices
|
- name: centos | check for amazon ebs devices
|
||||||
shell: lsblk -O -J| grep -qi "amazon elastic block store" ; echo $?
|
shell: |
|
||||||
|
set -o pipefail
|
||||||
|
lsblk -O -J | grep -qi "amazon elastic block store" ; echo $?
|
||||||
register: blkdev_awsebs
|
register: blkdev_awsebs
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
|
||||||
- name: centos | set flag for nvme subsystem
|
- name: centos | set flag for nvme subsystem
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|||||||
Reference in New Issue
Block a user