Explicitly set ETCDCTL_API and use ETCDCTL_ENDPOINTS (#6327)

This commit is contained in:
Maxime Guyot
2020-07-01 13:56:16 +02:00
committed by GitHub
parent bcac3c62a2
commit 00fe3d5094
6 changed files with 55 additions and 19 deletions

View File

@@ -46,10 +46,10 @@
- name: Backup etcd v3 data
command: >-
{{ bin_dir }}/etcdctl
--endpoints={{ etcd_access_addresses }}
snapshot save {{ etcd_backup_directory }}/snapshot.db
environment:
ETCDCTL_API: 3
ETCDCTL_ENDPOINTS: "{{ etcd_access_addresses }}"
ETCDCTL_CERT: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem"
ETCDCTL_KEY: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem"
ETCDCTL_CACERT: "{{ etcd_cert_dir }}/ca.pem"