From 06cd87127e2e2da665121e41d35f9a408e25ce0a Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 20 Nov 2017 13:14:47 +0100 Subject: docker: copy Docker metadata to the alternative storage path Signed-off-by: Giuseppe Scrivano --- roles/docker/tasks/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'roles/docker') 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 }}" -- cgit v1.2.3