- name: download etcd\r
get_url:\r
url={{ etcd_download_url }}\r
- dest=/tmp/{{ etcd_tarball }}\r
+ dest=/opt/{{ etcd_tarball }}\r
when:\r
- etcdexisted.stat.exists is undefined or etcdexisted.stat.exists == false\r
\r
- name: extract the etcd tarball\r
unarchive:\r
- src=/tmp/{{ etcd_tarball }}\r
- dest=/tmp/\r
+ src=/opt/{{ etcd_tarball }}\r
+ dest=/opt/\r
when:\r
- etcdexisted.stat.exists is undefined or etcdexisted.stat.exists == false\r
\r
register: service_etcd_status\r
\r
- name: run etcd daemon service\r
- shell: nohup ./etcd &>>etcd.log &\r
+ shell: nohup ./etcd --advertise-client-urls http://{{ etcd_host }}:{{ etcd_port }} --listen-client-urls http://{{ etcd_host }}:{{ etcd_port }} -advertise-client-urls http://{{ etcd_host }}:{{ etcd_peer_port }} -listen-peer-urls http://{{ etcd_host }}:{{ etcd_peer_port }} &>>etcd.log &\r
become: true\r
args:\r
chdir: "{{ etcd_dir }}"\r
- name: check etcd cluster health\r
shell: ./etcdctl cluster-health\r
become: true\r
+ ignore_errors: true\r
args:\r
chdir: "{{ etcd_dir }}"\r