summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2017-11-20 13:14:47 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2017-11-20 13:50:39 +0100
commit06cd87127e2e2da665121e41d35f9a408e25ce0a (patch)
treeef45d6c960b14bf13979550e88d9a79e214fe70b
parentf725e46bd897efe35cb8abba7862d1482c3011f4 (diff)
downloadopenshift-06cd87127e2e2da665121e41d35f9a408e25ce0a.tar.gz
openshift-06cd87127e2e2da665121e41d35f9a408e25ce0a.tar.bz2
openshift-06cd87127e2e2da665121e41d35f9a408e25ce0a.tar.xz
openshift-06cd87127e2e2da665121e41d35f9a408e25ce0a.zip
docker: copy Docker metadata to the alternative storage path
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--roles/docker/tasks/main.yml9
1 files changed, 5 insertions, 4 deletions
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index 69ee62790..1050de0fb 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -60,10 +60,11 @@
state: stopped
name: "{{ openshift.docker.service_name }}"
- - name: "Ensure {{ docker_alt_storage_path }} exists"
- file:
- path: "{{ docker_alt_storage_path }}"
- state: directory
+ - name: copy "{{ docker_default_storage_path }}" to "{{ docker_alt_storage_path }}"
+ command: "cp -r {{ docker_default_storage_path }} {{ docker_alt_storage_path }}"
+ register: results
+ failed_when:
+ - results.rc != 0
- name: "Set the selinux context on {{ docker_alt_storage_path }}"
command: "semanage fcontext -a -e {{ docker_default_storage_path }} {{ docker_alt_storage_path }}"