bugfix: fix grep command without -w option causing prefix matched while adding one etcd member (#10291)
parent
38ce02c610
commit
13aa32278a
|
@ -130,7 +130,7 @@
|
||||||
ETCDCTL_ENDPOINTS: "{{ etcd_events_access_addresses }}"
|
ETCDCTL_ENDPOINTS: "{{ etcd_events_access_addresses }}"
|
||||||
|
|
||||||
- name: Configure | Check if member is in etcd cluster
|
- name: Configure | Check if member is in etcd cluster
|
||||||
shell: "{{ bin_dir }}/etcdctl member list | grep -q {{ etcd_access_address }}"
|
shell: "{{ bin_dir }}/etcdctl member list | grep -w -q {{ etcd_access_address }}"
|
||||||
register: etcd_member_in_cluster
|
register: etcd_member_in_cluster
|
||||||
ignore_errors: true # noqa ignore-errors
|
ignore_errors: true # noqa ignore-errors
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
ETCDCTL_ENDPOINTS: "{{ etcd_access_addresses }}"
|
ETCDCTL_ENDPOINTS: "{{ etcd_access_addresses }}"
|
||||||
|
|
||||||
- name: Configure | Check if member is in etcd-events cluster
|
- name: Configure | Check if member is in etcd-events cluster
|
||||||
shell: "{{ bin_dir }}/etcdctl member list | grep -q {{ etcd_access_address }}"
|
shell: "{{ bin_dir }}/etcdctl member list | grep -w -q {{ etcd_access_address }}"
|
||||||
register: etcd_events_member_in_cluster
|
register: etcd_events_member_in_cluster
|
||||||
ignore_errors: true # noqa ignore-errors
|
ignore_errors: true # noqa ignore-errors
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|
||||||
- name: Join Member | Ensure member is in etcd-events cluster
|
- name: Join Member | Ensure member is in etcd-events cluster
|
||||||
shell: "set -o pipefail && {{ bin_dir }}/etcdctl member list | grep {{ etcd_events_access_address }} >/dev/null"
|
shell: "set -o pipefail && {{ bin_dir }}/etcdctl member list | grep -w {{ etcd_events_access_address }} >/dev/null"
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
register: etcd_events_member_in_cluster
|
register: etcd_events_member_in_cluster
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|
||||||
- name: Join Member | Ensure member is in etcd cluster
|
- name: Join Member | Ensure member is in etcd cluster
|
||||||
shell: "set -o pipefail && {{ bin_dir }}/etcdctl member list | grep {{ etcd_access_address }} >/dev/null"
|
shell: "set -o pipefail && {{ bin_dir }}/etcdctl member list | grep -w {{ etcd_access_address }} >/dev/null"
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
register: etcd_member_in_cluster
|
register: etcd_member_in_cluster
|
||||||
|
|
Loading…
Reference in New Issue