From: Zack Cerza Date: Thu, 28 May 2015 21:36:15 +0000 (-0600) Subject: Set iso_name and iso_path when not downloading X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e7ad842b7a894f6ddbfa85e4f1cf5329a6caa2f5;p=ceph-cm-ansible.git Set iso_name and iso_path when not downloading Otherwise we bail when trying to clear the mount point Signed-off-by: Zack Cerza --- diff --git a/roles/cobbler_profile/tasks/download_iso.yml b/roles/cobbler_profile/tasks/download_iso.yml index c6b65fc6..6facf283 100644 --- a/roles/cobbler_profile/tasks/download_iso.yml +++ b/roles/cobbler_profile/tasks/download_iso.yml @@ -1,12 +1,4 @@ --- -- name: Set ISO name - set_fact: - iso_name: "{{ distro.iso.split('/')[-1] }}" - -- name: Set ISO path - set_fact: - iso_path: "{{ iso_dir }}/{{ iso_name }}" - - name: Check to see if the ISO exists stat: path={{ iso_path }} get_checksum=no get_md5=no register: iso_stat diff --git a/roles/cobbler_profile/tasks/import_distro.yml b/roles/cobbler_profile/tasks/import_distro.yml index fc0027c8..8b290736 100644 --- a/roles/cobbler_profile/tasks/import_distro.yml +++ b/roles/cobbler_profile/tasks/import_distro.yml @@ -28,6 +28,14 @@ ignore_errors: true changed_when: false +- name: Set ISO name + set_fact: + iso_name: "{{ distro.iso.split('/')[-1] }}" + +- name: Set ISO path + set_fact: + iso_path: "{{ iso_dir }}/{{ iso_name }}" + - include: download_iso.yml when: distro.iso != ''