c12s-kubespray/roles/kubernetes/preinstall/templates/vsphere-cloud-config.j2

51 lines
No EOL
1.3 KiB
Django/Jinja

{%- if kube_version | version_compare('v1.9.2', '>=') -%}
[Global]
datacenters = "{{ vsphere_datacenter }}"
insecure-flag = {{ vsphere_insecure }}
password = "{{ vsphere_password }}"
port = {{ vsphere_vcenter_port }}
user = "{{ vsphere_user }}"
[VirtualCenter "{{ vsphere_vcenter_ip }}"]
[Workspace]
server = "{{ vsphere_vcenter_ip }}"
datacenter = "{{ vsphere_datacenter }}"
folder = "{{ vsphere_working_dir }}"
default-datastore = "{{ vsphere_datastore }}"
resourcepool-path = "{{ vsphere_resource_pool }}"
[Disk]
scsicontrollertype = {{ vsphere_scsi_controller_type }}
{% if vsphere_public_network is defined and vsphere_public_network != "" %}
[Network]
public-network = {{ vsphere_public_network }}
{% endif %}
{%- else -%}
[Global]
datacenter = "{{ vsphere_datacenter }}"
datastore = "{{ vsphere_datastore }}"
insecure-flag = {{ vsphere_insecure }}
password = "{{ vsphere_password }}"
port = {{ vsphere_vcenter_port }}
server = "{{ vsphere_vcenter_ip }}"
user = "{{ vsphere_user }}"
working-dir = "{{ vsphere_working_dir }}"
{% if vsphere_vm_uuid is defined %}
vm-uuid = {{ vsphere_vm_uuid }}
{% endif %}
[Disk]
scsicontrollertype = {{ vsphere_scsi_controller_type }}
{% if vsphere_public_network is defined and vsphere_public_network != "" %}
[Network]
public-network = {{ vsphere_public_network }}
{% endif %}
{%- endif -%}