]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-common: explicitly create the directory portion of the iso path 881/head
authorAlfredo Deza <adeza@redhat.com>
Tue, 12 Jul 2016 13:59:27 +0000 (09:59 -0400)
committerAlfredo Deza <adeza@redhat.com>
Tue, 12 Jul 2016 13:59:27 +0000 (09:59 -0400)
This will help if the path to the iso exists in the originating server but not
in the remote paths. This issue is not seen if using /tmp/file.iso but does
show up when using nested paths.

Signed-off-by: Alfredo Deza <adeza@redhat.com>
Resolves: rhbz#1355762

roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_iso_install.yml

index df5e473bc6cbe1454ad55f26956e00b3a7159a89..c376e6b56520e2b3aa2f6ae6fd56dd96d80e653c 100644 (file)
@@ -6,7 +6,13 @@
   with_items:
     - "{{ ceph_stable_rh_storage_mount_path }}"
     - "{{ ceph_stable_rh_storage_repository_path }}"
-    - "{{ ceph_stable_rh_storage_iso_path }}"
+
+- name: ensure destination iso directory exists
+  file:
+    path: "{{ ceph_stable_rh_storage_iso_path | dirname }}"
+    state: directory
+    recurse: yes
+  when: "'{{ ceph_stable_rh_storage_iso_path | dirname }}' != '/'"
 
 - name: fetch the red hat storage iso from the ansible server
   copy: