---

- name: derive the etcd client connection URL
  set_fact: etcd_api_url=http://{{ ansible_eth1.ipv4.address }}:{{ etcd_api_port }}

- name: etcd2 unit file
  template: src=etcd-20-cluster.conf.j2 dest=/etc/systemd/system/etcd2.service.d/20-cluster.conf
  sudo: yes

- name: etcd2 service
  service: name=etcd2.service enabled=yes state=started
  sudo: yes

- name: ensure etcd2 is listening
  wait_for: port={{ etcd_api_port }} delay=5 state=started

- name: bootstrap the etcd key
  command: etcdctl set /deconst/control_updated 1

---

- name: derive the etcd client connection URL
  set_fact: etcd_api_url=http://{{ ansible_eth1.ipv4.address }}:{{ etcd_api_port }}

- name: etcd2 unit file directory
  file: state=directory path=/etc/systemd/system/etcd2.service.d owner=root group=root mode=0755
  sudo: yes

- name: etcd2 unit file
  template: src=etcd-20-cluster.conf.j2 dest=/etc/systemd/system/etcd2.service.d/20-cluster.conf
  sudo: yes

- name: etcd2 service
  service: name=etcd2.service enabled=yes state=started
  sudo: yes

- name: ensure etcd2 is listening
  wait_for: port={{ etcd_api_port }} delay=5 state=started

- name: bootstrap the etcd key
  command: etcdctl set /deconst/control_updated 1

Create the directory for the unit file.
Create the directory for the unit file.
