Skip to content

Commit

Permalink
fix: add pipefail
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Muransky committed Dec 18, 2024
1 parent b8fe25e commit ee45dc9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tasks/first_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,11 @@
when: do_etcd_restore is defined or do_etcd_restore_from_s3 is defined
block:
- name: Get registered nodes
ansible.builtin.shell: |
{{ rke2_data_path }}/bin/kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml \
get nodes --no-headers | awk '{print $1}'
ansible.builtin.shell:
cmd: |
set -o pipefail
{{ rke2_data_path }}/bin/kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml \
get nodes --no-headers | awk '{print $1}'
args:
executable: /bin/bash
changed_when: false
Expand Down

0 comments on commit ee45dc9

Please sign in to comment.