Browse Source

add template and vsphere.conf

Davis Phillips 7 years ago
parent
commit
805c4a3d5b

+ 6 - 0
roles/openshift_cloud_provider/tasks/vsphere.yml

@@ -0,0 +1,6 @@
+---
+- name: Create cloud config
+  template:
+    dest: "{{ openshift.common.config_base }}/cloudprovider/vsphere.conf"
+    src: vsphere.conf.j2
+  when: openshift_cloudprovider_vsphere_username is defined and openshift_cloudprovider_vsphere_password is defined and openshift_cloudprovider_vsphere_host is defined and openshift_cloudprovider_vsphere_datacenter is defined and openshift_cloudprovider_vsphere_datastore is defined 

+ 15 - 0
roles/openshift_cloud_provider/templates/vsphere.conf.j2

@@ -0,0 +1,15 @@
+[Global]
+user = "{{ openshift_cloudprovider_vsphere_username }}"
+password = "{{ openshift_cloudprovider_vsphere_password }}"
+server = "{{ openshift_cloudprovider_vsphere_host }}"
+port = 443
+insecure-flag = 1
+datacenter = {{ openshift_cloudprovider_vsphere_datacenter }}
+datastore = {{ openshift_cloudprovider_vsphere_datastore }}
+{% if openshift_cloudprovider_vsphere_folder is defined %}
+working-dir = /{{ openshift_cloudprovider_vsphere_datacenter }}/vm/{{ openshift_cloudprovider_vsphere_folder }}/
+{% else %}
+working-dir = /{{ openshift_cloudprovider_vsphere_datacenter }}/vm/
+{% endif %}
+[Disk]
+scsicontrollertype = pvscsi