Fix etcd member list when upgrading ETCD from an old version

pull/746/head
Matthew Mosesohn 2016-12-14 16:44:14 +03:00
parent 8e809aed01
commit 9cc73bdf08
1 changed files with 9 additions and 0 deletions

View File

@ -34,3 +34,12 @@
command: "docker rm -f {{item}}"
with_items: "{{etcd_proxy_container.stdout_lines}}"
- name: "Pre-upgrade | check if member list is non-SSL"
command: etcdctl member list
register: etcd_member_list
ignore_errors: true
- name: "Pre-upgrade | change peer names to SSL"
shell: >-
etcdctl member list | awk -F"[: =]" '{print "etcdctl member update "$1" https:"$7":"$8}' | bash
when: 'etcd_member_list is defined and "http://" in etcd_member_list.stdout'