Browse Source

Added validation to avoid upload template always

Juan Manuel Parrilla Madrid 6 năm trước cách đây
mục cha
commit
3a4e90f497

+ 1 - 1
playbooks/ovirt/openshift-cluster/ovirt-vm-infra.yml

@@ -20,7 +20,7 @@
         tasks_from: build_vm_list.yml
 
   roles:
-    - oVirt.image-template
+    - { role: oVirt.image-template, when: qcow_url is defined }
     - oVirt.vm-infra
 
   post_tasks:

+ 1 - 0
playbooks/ovirt/provisioning-vars.yaml.example

@@ -20,6 +20,7 @@ openshift_ovirt_ssh_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
 # Template Creation
 # https://github.com/oVirt/ovirt-ansible-image-template
 ##########################
+# If you comment the 'qcow_url' variable the template upload role will not be loaded  
 qcow_url:                       # https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2c
 image_path: "{{ lookup('env', 'HOME') }}/Downloads/{{ template_name }}.qcow2"
 template_name:                  # rhel75