Description of problem: I have set in "all": ceph_stable_rh_storage_iso_install: true # usually used when nodes don't have access to cdn.redhat.com ceph_stable_rh_storage_iso_path: /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso <-iso stored on ansible machine and I expect that path also on all nodes ceph_stable_rh_storage_mount_path: /root/iso <-mount point on nodes and I've seen: msg: Error mounting /root/iso: mount: /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso: failed to setup loop device: No such device or address According logs Ansible has copied ISO to /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso and then mount /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso to /root/iso which is not possible because /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso is directory. I've fixed this issue by changing /usr/share/ceph-ansible/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_iso_install.yml to: --- - name: create red hat storage package directories file: path: "{{ item }}" state: directory with_items: <- removed creating of directory /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso - "{{ ceph_stable_rh_storage_mount_path }}" - "{{ ceph_stable_rh_storage_repository_path }}" - name: fetch the red hat storage iso from the ansible server copy: src: "{{ ceph_stable_rh_storage_iso_path }}" dest: "/root" <- fetch /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso from Ansible server to /root on nodes What I see is that there should be new variable for path to ISO on Ansible server or new variable for destination for ISO on nodes. Version-Release number of selected component (if applicable): ceph-ansible-1.0.5-25.el7scon.noarch How reproducible: 100%
I think this is related to https://bugzilla.redhat.com/show_bug.cgi?id=1338551 Your suggestion of adding a new variable to fix this properly sounds like the right approach.
Pull request created: https://github.com/ceph/ceph-ansible/pull/881 It will not require a new variable to be set, it will detect the path up to the directory of the iso and create it if it doesn't exist.
PR merged upstream; just need to cherry-pick downstream.
Tested with ceph-ansible-1.0.5-32.el7scon.noarch and it's OK.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2016:1754