diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-01-17 09:04:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-17 09:04:58 -0500 |
commit | 52860b6cdf48f0b74b0da13ad7d0663c663381d6 (patch) | |
tree | dd54cc2dd8684aa34e6ea8ec9ab22744da6b5c2c /playbooks | |
parent | abe838c4fcd20fb51d1de3dac495036a9e4159b0 (diff) | |
parent | 51ccdc246726a6ecbf4a44f17b488aae533dd9f7 (diff) | |
download | openshift-52860b6cdf48f0b74b0da13ad7d0663c663381d6.tar.gz openshift-52860b6cdf48f0b74b0da13ad7d0663c663381d6.tar.bz2 openshift-52860b6cdf48f0b74b0da13ad7d0663c663381d6.tar.xz openshift-52860b6cdf48f0b74b0da13ad7d0663c663381d6.zip |
Merge pull request #3064 from giuseppe/fix-etcdctl-from-container
use etcdctl from the container when containerized=True
Diffstat (limited to 'playbooks')
-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 be42f005f..d0eadf1fc 100644 --- a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml +++ b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml @@ -4,6 +4,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: @@ -67,7 +68,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: |