From 85bc3384f53e8eb2c9a4e65bf5f7b0b8baf06faa Mon Sep 17 00:00:00 2001 From: Robin Elfrink Date: Tue, 26 Jan 2021 11:35:26 +0100 Subject: [PATCH] Fix unintended SIGPIPEs. --- roles/etcd/tasks/configure.yml | 4 ++-- roles/etcd/tasks/join_etcd-events_member.yml | 2 +- roles/etcd/tasks/join_etcd_member.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/etcd/tasks/configure.yml b/roles/etcd/tasks/configure.yml index 0d60e9cc101..331dec72f81 100644 --- a/roles/etcd/tasks/configure.yml +++ b/roles/etcd/tasks/configure.yml @@ -1,6 +1,6 @@ --- - name: Configure | Check if etcd cluster is healthy - shell: "set -o pipefail && {{ bin_dir }}/etcdctl endpoint --cluster status && {{ bin_dir }}/etcdctl endpoint --cluster health 2>&1 | grep -q -v 'Error: unhealthy cluster'" + shell: "set -o pipefail && {{ bin_dir }}/etcdctl endpoint --cluster status && {{ bin_dir }}/etcdctl endpoint --cluster health 2>&1 | grep -v 'Error: unhealthy cluster' >/dev/null" args: executable: /bin/bash register: etcd_cluster_is_healthy @@ -19,7 +19,7 @@ ETCDCTL_ENDPOINTS: "{{ etcd_access_addresses }}" - name: Configure | Check if etcd-events cluster is healthy - shell: "set -o pipefail && {{ bin_dir }}/etcdctl endpoint --cluster status && {{ bin_dir }}/etcdctl endpoint --cluster health 2>&1 | grep -q -v 'Error: unhealthy cluster'" + shell: "set -o pipefail && {{ bin_dir }}/etcdctl endpoint --cluster status && {{ bin_dir }}/etcdctl endpoint --cluster health 2>&1 | grep -v 'Error: unhealthy cluster' >/dev/null" args: executable: /bin/bash register: etcd_events_cluster_is_healthy diff --git a/roles/etcd/tasks/join_etcd-events_member.yml b/roles/etcd/tasks/join_etcd-events_member.yml index 0efd3c91639..8336f1a4031 100644 --- a/roles/etcd/tasks/join_etcd-events_member.yml +++ b/roles/etcd/tasks/join_etcd-events_member.yml @@ -25,7 +25,7 @@ {%- endfor -%} - name: Join Member | Ensure member is in etcd-events cluster - shell: "set -o pipefail && {{ bin_dir }}/etcdctl member list | grep -q {{ etcd_events_access_address }}" + shell: "set -o pipefail && {{ bin_dir }}/etcdctl member list | grep {{ etcd_events_access_address }} >/dev/null" args: executable: /bin/bash register: etcd_events_member_in_cluster diff --git a/roles/etcd/tasks/join_etcd_member.yml b/roles/etcd/tasks/join_etcd_member.yml index 468a7cd92e8..28d259cccd6 100644 --- a/roles/etcd/tasks/join_etcd_member.yml +++ b/roles/etcd/tasks/join_etcd_member.yml @@ -26,7 +26,7 @@ {%- endfor -%} - name: Join Member | Ensure member is in etcd cluster - shell: "set -o pipefail && {{ bin_dir }}/etcdctl member list | grep -q {{ etcd_access_address }}" + shell: "set -o pipefail && {{ bin_dir }}/etcdctl member list | grep {{ etcd_access_address }} >/dev/null" args: executable: /bin/bash register: etcd_member_in_cluster