render vsphere_resource_pool only if defined

This commit is contained in:
Julian Hübenthal 2018-01-31 09:56:43 +01:00
parent fc29764911
commit 9cdd2214f9

View file

@ -14,7 +14,11 @@ server = "{{ vsphere_vcenter_ip }}"
datacenter = "{{ vsphere_datacenter }}" datacenter = "{{ vsphere_datacenter }}"
folder = "{{ vsphere_working_dir }}" folder = "{{ vsphere_working_dir }}"
default-datastore = "{{ vsphere_datastore }}" default-datastore = "{{ vsphere_datastore }}"
{% if vsphere_resource_pool is defined and vsphere_resource_pool != "" %}
resourcepool-path = "{{ vsphere_resource_pool }}" resourcepool-path = "{{ vsphere_resource_pool }}"
{% endif %}
[Disk] [Disk]
scsicontrollertype = {{ vsphere_scsi_controller_type }} scsicontrollertype = {{ vsphere_scsi_controller_type }}