---
- name: Refresh config | Create etcd config file
  template:
    src: etcd.env.j2
    dest: /etc/etcd.env
    mode: "0640"
  notify: Restart etcd
  when:
    - ('etcd' in group_names)
    - etcd_cluster_setup

- name: Refresh config | Create etcd-events config file
  template:
    src: etcd-events.env.j2
    dest: /etc/etcd-events.env
    mode: "0640"
  notify: Restart etcd-events
  when:
    - ('etcd' in group_names)
    - etcd_events_cluster_setup
