mirror of
https://github.com/KevinMidboe/kazan-ansible.git
synced 2026-02-14 12:19:27 +00:00
etcd role for controller nodes
This commit is contained in:
31
roles/etcd/templates/etcd.service.j2
Normal file
31
roles/etcd/templates/etcd.service.j2
Normal file
@@ -0,0 +1,31 @@
|
||||
[Unit]
|
||||
Description=etcd
|
||||
Documentation=https://github.com/coreos
|
||||
|
||||
[Service]
|
||||
Environment=ETCDCTL_API=3
|
||||
ExecStart=/usr/bin/etcd \
|
||||
--name {{ inventory_hostname }} \
|
||||
--data-dir=/var/lib/etcd \
|
||||
--listen-peer-urls https://{{ ansible_default_ipv4.address }}:2380 \
|
||||
--listen-client-urls https://{{ ansible_default_ipv4.address }}:2379,https://127.0.0.1:2379 \
|
||||
--initial-advertise-peer-urls https://{{ ansible_default_ipv4.address }}:2380 \
|
||||
--initial-cluster c1.kazan.schleppe=https://10.0.0.141:2380,c2.kazan.schleppe=https://10.0.0.142:2380,c3.kazan.schleppe=https://10.0.0.143:2380 \
|
||||
--initial-cluster-state new \
|
||||
--initial-cluster-token etcd-cluster-0 \
|
||||
--advertise-client-urls https://{{ ansible_default_ipv4.address }}:2379 \
|
||||
--cert-file=/etc/etcd/kubernetes.pem \
|
||||
--key-file=/etc/etcd/kubernetes-key.pem \
|
||||
--client-cert-auth \
|
||||
--trusted-ca-file=/etc/etcd/ca.pem \
|
||||
--peer-cert-file=/etc/etcd/kubernetes.pem \
|
||||
--peer-key-file=/etc/etcd/kubernetes-key.pem \
|
||||
--peer-client-cert-auth \
|
||||
--peer-trusted-ca-file=/etc/etcd/ca.pem
|
||||
|
||||
Type=notify
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user