mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-17 19:20:10 -03:30
reworked vsphere-cloud-config template
This commit is contained in:
@@ -1,23 +1,35 @@
|
||||
{%- if kube_version | version_compare('v1.9.2', '>=') -%}
|
||||
|
||||
[Global]
|
||||
datacenters = "{{ vsphere_datacenter }}"
|
||||
insecure-flag = {{ vsphere_insecure }}
|
||||
user = "{{ vsphere_user }}"
|
||||
password = "{{ vsphere_password }}"
|
||||
port = {{ vsphere_vcenter_port }}
|
||||
user = "{{ vsphere_user }}"
|
||||
insecure-flag = {{ vsphere_insecure }}
|
||||
|
||||
{% if kube_version | version_compare('v1.9.2', '>=') %}
|
||||
datacenters = "{{ vsphere_datacenter }}"
|
||||
{% else %}
|
||||
datastore = "{{ vsphere_datastore }}"
|
||||
datacenter = "{{ vsphere_datacenter }}"
|
||||
working-dir = "{{ vsphere_working_dir }}"
|
||||
server = "{{ vsphere_vcenter_ip }}"
|
||||
{% if vsphere_vm_uuid is defined and vsphere_vm_uuid != "" %}
|
||||
vm-uuid = "{{ vsphere_vm_uuid }}"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if kube_version | version_compare('v1.9.2', '>=') %}
|
||||
|
||||
[VirtualCenter "{{ vsphere_vcenter_ip }}"]
|
||||
|
||||
|
||||
[Workspace]
|
||||
server = "{{ vsphere_vcenter_ip }}"
|
||||
datacenter = "{{ vsphere_datacenter }}"
|
||||
folder = "{{ vsphere_working_dir }}"
|
||||
default-datastore = "{{ vsphere_datastore }}"
|
||||
|
||||
{% if vsphere_resource_pool is defined and vsphere_resource_pool != "" %}
|
||||
resourcepool-path = "{{ vsphere_resource_pool }}"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
[Disk]
|
||||
@@ -26,30 +38,4 @@ 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 -%}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user