This commit is contained in:
chris 2019-12-18 19:36:30 +01:00
parent cb0318742c
commit 5b30f273f8
3 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,6 @@
---
- name: restart etcd
service:
name: etcd
state: restarted
enabled: yes

View File

@ -0,0 +1,9 @@
---
- name: etcd-server package
apt:
name: etcd-server
- name: etcd configuration
template:
src: defaults-etcd.j2
dest: /etc/defaults/etcd
notify: restart etcd

View File

@ -0,0 +1,10 @@
ETCD_NAME="{{ansible_nodename}}"
ETCD_DATA_DIR="/var/lib/etcd"
ETCD_LISTEN_PEER_URLS="http://{{wg_ip}}:2380"
ETCD_LISTEN_CLIENT_URLS="http://{{wg_ip}}:2379"
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://{{ansible_nodename}}:2380"
ETCD_INITIAL_CLUSTER="node01=http://10.23.23.11:2380,node02=http://10.23.23.12:22380,node03=http://10.23.23.13:32380"
ETCD_INITIAL_CLUSTER_STATE="new"
ETCD_INITIAL_CLUSTER_TOKEN="{{etcd_cluster_token}}"
ETCD_ADVERTISE_CLIENT_URLS="http://{{ansible_nodename}}:2379"
ETCD_AUTO_COMPACTION_RETENTION=3