Fix riski shell pipe

This commit is contained in:
Sandwich 2024-10-31 00:43:49 +01:00
parent 3c94a33ae7
commit d92944c345

View File

@ -205,7 +205,7 @@
register: net_inf register: net_inf
- name: Register MAC Address of the Network Interface - name: Register MAC Address of the Network Interface
ansible.builtin.shell: ip link show "{{ net_inf.stdout }}" | awk '/link\/ether/ {print $2}' | tr '[:lower:]' '[:upper:]' ansible.builtin.shell: set -o pipefail && ip link show "{{ net_inf.stdout }}" | awk '/link\/ether/ {print $2}' | tr '[:lower:]' '[:upper:]'
register: net_mac register: net_mac
changed_when: net_mac.rc == 0 changed_when: net_mac.rc == 0