--- - name: Add etcd systemd unit template: src: etcd.service.j2 dest: /etc/systemd/system/etcd.service mode: 700 become: true - name: Reload systemd command: systemctl daemon-reload become: true - name: Enable etcd service command: systemctl enable etcd become: true - name: Restart etcd service: name: etcd state: restarted enabled: yes become: true - name: Wait for etcd listening wait_for: port=2379 timeout=60 # - name: Verify etcd cluster health # shell: etcdctl --ca-file=/etc/etcd/ca.pem cluster-health # register: cmd_result # until: cmd_result.stdout.find("cluster is healthy") != -1 # retries: 5 # delay: 5