* Fix: follow best practice for pipe in shell command

This commit is contained in:
Roxyrob
2021-03-16 23:24:24 +01:00
parent f87c42a8c5
commit 535b410363

View File

@@ -6,14 +6,22 @@
become: true
- 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
changed_when: false
- 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
changed_when: false
args:
executable: /bin/bash
- name: centos | set flag for nvme subsystem
set_fact: