Uses environment vars for etcd cert paths
This commit is contained in:
parent
6f9f80acee
commit
639010b3df
1 changed files with 5 additions and 4 deletions
|
@ -50,8 +50,6 @@
|
||||||
command: |-
|
command: |-
|
||||||
{{ bin_dir }}/etcdctl \
|
{{ bin_dir }}/etcdctl \
|
||||||
--endpoints={{ etcd_access_addresses }} \
|
--endpoints={{ etcd_access_addresses }} \
|
||||||
--cert={{ etcd_cert_dir }}/admin-{{ groups['etcd'][0] }}.pem \
|
|
||||||
--key={{ etcd_cert_dir }}/admin-{{ groups['etcd'][0] }}-key.pem \
|
|
||||||
put /calico/bgp/v1/rr_v4/{{ rr_ip }} \
|
put /calico/bgp/v1/rr_v4/{{ rr_ip }} \
|
||||||
'{
|
'{
|
||||||
"ip": "{{ rr_ip }}",
|
"ip": "{{ rr_ip }}",
|
||||||
|
@ -59,6 +57,8 @@
|
||||||
}'
|
}'
|
||||||
environment:
|
environment:
|
||||||
ETCDCTL_API: 3
|
ETCDCTL_API: 3
|
||||||
|
ETCDCTL_CERT: "{{ etcd_cert_dir }}/admin-{{ groups['etcd'][0] }}.pem"
|
||||||
|
ETCDCTL_KEY: "{{ etcd_cert_dir }}/admin-{{ groups['etcd'][0] }}-key.pem"
|
||||||
retries: 4
|
retries: 4
|
||||||
delay: "{{ retry_stagger | random + 3 }}"
|
delay: "{{ retry_stagger | random + 3 }}"
|
||||||
delegate_to: "{{groups['etcd'][0]}}"
|
delegate_to: "{{groups['etcd'][0]}}"
|
||||||
|
@ -69,13 +69,14 @@
|
||||||
command: |-
|
command: |-
|
||||||
{{ bin_dir }}/etcdctl \
|
{{ bin_dir }}/etcdctl \
|
||||||
--peers={{ etcd_access_addresses }} \
|
--peers={{ etcd_access_addresses }} \
|
||||||
--cert-file {{ etcd_cert_dir }}/admin-{{ groups['etcd'][0] }}.pem \
|
|
||||||
--key-file {{ etcd_cert_dir }}/admin-{{ groups['etcd'][0] }}-key.pem \
|
|
||||||
set /calico/bgp/v1/rr_v4/{{ rr_ip }} \
|
set /calico/bgp/v1/rr_v4/{{ rr_ip }} \
|
||||||
'{
|
'{
|
||||||
"ip": "{{ rr_ip }}",
|
"ip": "{{ rr_ip }}",
|
||||||
"cluster_id": "{{ cluster_id }}"
|
"cluster_id": "{{ cluster_id }}"
|
||||||
}'
|
}'
|
||||||
|
environment:
|
||||||
|
ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/admin-{{ groups['etcd'][0] }}.pem"
|
||||||
|
ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/admin-{{ groups['etcd'][0] }}-key.pem"
|
||||||
retries: 4
|
retries: 4
|
||||||
delay: "{{ retry_stagger | random + 3 }}"
|
delay: "{{ retry_stagger | random + 3 }}"
|
||||||
delegate_to: "{{groups['etcd'][0]}}"
|
delegate_to: "{{groups['etcd'][0]}}"
|
||||||
|
|
Loading…
Reference in a new issue