name: "{{ mountdir }}/proc"\r
state: unmounted\r
\r
+- mount:\r
+ name: "{{ mountdir }}/run"\r
+ state: unmounted\r
+\r
- mount:\r
name: "{{ mountdir }}"\r
state: unmounted\r
\r
- debug:\r
msg: "yardstick image = {{ imgfile }}"\r
+\r
+- set_fact:\r
+ imgdest: "/var/lib/libvirt/images/{{ imgfile | basename}}"\r
+ name: "{{ (imgfile | basename | splitext)[0] }}"\r
+ ext: "{{ (imgfile | basename | splitext)[1] }}"\r
+\r
+- name: Verify if imgfile exists in libvirt images\r
+ stat:\r
+ path: "{{ imgdest }}"\r
+ register: imgdest_stat\r
+\r
+- set_fact:\r
+ imgdest: "/var/lib/libvirt/images/{{ name }}_autogen{{ ext }}"\r
+ when: imgdest_stat.stat.exists\r
+\r
+- name: Copy image to libvirt images\r
+ shell: "cp {{ imgfile }} {{ imgdest }}"\r