summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorDavis Phillips <davis.phillips@gmail.com>2017-12-11 09:33:59 -0600
committerDavis Phillips <davis.phillips@gmail.com>2017-12-11 09:33:59 -0600
commit805c4a3d5be1433ee38e495885fea185d1359561 (patch)
tree019140f5d4d9409aa2c7484469913029dd01f945 /roles
parent1e3fd54d705b4093ef64429e23b9ad6fecbb8df7 (diff)
downloadopenshift-805c4a3d5be1433ee38e495885fea185d1359561.tar.gz
openshift-805c4a3d5be1433ee38e495885fea185d1359561.tar.bz2
openshift-805c4a3d5be1433ee38e495885fea185d1359561.tar.xz
openshift-805c4a3d5be1433ee38e495885fea185d1359561.zip
add template and vsphere.conf
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_cloud_provider/tasks/vsphere.yml6
-rw-r--r--roles/openshift_cloud_provider/templates/vsphere.conf.j215
2 files changed, 21 insertions, 0 deletions
diff --git a/roles/openshift_cloud_provider/tasks/vsphere.yml b/roles/openshift_cloud_provider/tasks/vsphere.yml
new file mode 100644
index 000000000..9197fb4bc
--- /dev/null
+++ b/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
diff --git a/roles/openshift_cloud_provider/templates/vsphere.conf.j2 b/roles/openshift_cloud_provider/templates/vsphere.conf.j2
new file mode 100644
index 000000000..84e5e371c
--- /dev/null
+++ b/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