diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2017-01-10 18:53:11 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2017-01-10 20:43:17 +0100 |
commit | 51ccdc246726a6ecbf4a44f17b488aae533dd9f7 (patch) | |
tree | 47213d0bb4b084f57661c7accb63beacafb0b492 /playbooks/common/openshift-cluster/upgrades | |
parent | 4c2a6db2b968abdf7ab641340700856ff179e8e3 (diff) | |
download | openshift-51ccdc246726a6ecbf4a44f17b488aae533dd9f7.tar.gz openshift-51ccdc246726a6ecbf4a44f17b488aae533dd9f7.tar.bz2 openshift-51ccdc246726a6ecbf4a44f17b488aae533dd9f7.tar.xz openshift-51ccdc246726a6ecbf4a44f17b488aae533dd9f7.zip |
use etcdctl from the container when containerized=True
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/etcd/backup.yml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml index b7f0267c1..727b24234 100644 --- a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml +++ b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml @@ -3,6 +3,7 @@ vars: embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}" timestamp: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" + etcdctl_command: "{{ 'etcdctl' if not openshift.common.is_containerized or embedded_etcd else 'docker exec etcd_container etcdctl' }}" roles: - openshift_facts tasks: @@ -47,7 +48,7 @@ - name: Generate etcd backup command: > - etcdctl backup --data-dir={{ openshift.etcd.etcd_data_dir }} + {{ etcdctl_command }} backup --data-dir={{ openshift.etcd.etcd_data_dir }} --backup-dir={{ openshift.common.data_dir }}/etcd-backup-{{ backup_tag | default('') }}{{ timestamp }} - set_fact: |