From 1e3fd54d705b4093ef64429e23b9ad6fecbb8df7 Mon Sep 17 00:00:00 2001 From: Davis Phillips Date: Mon, 11 Dec 2017 09:32:19 -0600 Subject: add vsphere cloud providers --- roles/openshift_cloud_provider/tasks/main.yml | 3 +++ roles/openshift_cloud_provider/vars/main.yml | 1 + 2 files changed, 4 insertions(+) (limited to 'roles/openshift_cloud_provider') diff --git a/roles/openshift_cloud_provider/tasks/main.yml b/roles/openshift_cloud_provider/tasks/main.yml index dff492a69..3513577fa 100644 --- a/roles/openshift_cloud_provider/tasks/main.yml +++ b/roles/openshift_cloud_provider/tasks/main.yml @@ -19,3 +19,6 @@ - include_tasks: gce.yml when: cloudprovider_is_gce | bool + +- include_tasks: vsphere.yml + when: cloudprovider_is_vsphere | bool diff --git a/roles/openshift_cloud_provider/vars/main.yml b/roles/openshift_cloud_provider/vars/main.yml index c9d953f58..e71db80b9 100644 --- a/roles/openshift_cloud_provider/vars/main.yml +++ b/roles/openshift_cloud_provider/vars/main.yml @@ -3,3 +3,4 @@ has_cloudprovider: "{{ openshift_cloudprovider_kind | default(None) != None }}" cloudprovider_is_aws: "{{ has_cloudprovider | bool and openshift_cloudprovider_kind == 'aws' }}" cloudprovider_is_openstack: "{{ has_cloudprovider | bool and openshift_cloudprovider_kind == 'openstack' }}" cloudprovider_is_gce: "{{ has_cloudprovider | bool and openshift_cloudprovider_kind == 'gce' }}" +cloudprovider_is_vsphere: "{{ has_cloudprovider | bool and openshift_cloudprovider_kind == 'vsphere' }}" -- cgit v1.2.3 From 805c4a3d5be1433ee38e495885fea185d1359561 Mon Sep 17 00:00:00 2001 From: Davis Phillips Date: Mon, 11 Dec 2017 09:33:59 -0600 Subject: add template and vsphere.conf --- roles/openshift_cloud_provider/tasks/vsphere.yml | 6 ++++++ roles/openshift_cloud_provider/templates/vsphere.conf.j2 | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 roles/openshift_cloud_provider/tasks/vsphere.yml create mode 100644 roles/openshift_cloud_provider/templates/vsphere.conf.j2 (limited to 'roles/openshift_cloud_provider') 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 -- cgit v1.2.3 From 52a55f2a5b16e8da59dd21180b077151e57617f2 Mon Sep 17 00:00:00 2001 From: Davis Phillips Date: Mon, 11 Dec 2017 10:01:26 -0600 Subject: lint issues --- roles/openshift_cloud_provider/tasks/vsphere.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles/openshift_cloud_provider') diff --git a/roles/openshift_cloud_provider/tasks/vsphere.yml b/roles/openshift_cloud_provider/tasks/vsphere.yml index 9197fb4bc..3a33df241 100644 --- a/roles/openshift_cloud_provider/tasks/vsphere.yml +++ b/roles/openshift_cloud_provider/tasks/vsphere.yml @@ -3,4 +3,4 @@ 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 + 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 -- cgit v1.2.3 From 801779eeb6f6308f81ae7c48409de7686c04a0aa Mon Sep 17 00:00:00 2001 From: Michael Gugino Date: Wed, 13 Dec 2017 12:42:32 -0500 Subject: Relocate filter plugins to lib_utils This commit relocates filter_plugings to lib_utils, changes the namespacing to prevent unintended use of older versions that may be present in filter_plugins/ directory on existing installs. Add lib_utils to meta depends for roles Also consolidate some plugins into lib_utils from various other areas. Update rpm spec, obsolete plugin rpms. --- roles/openshift_cloud_provider/meta/main.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'roles/openshift_cloud_provider') diff --git a/roles/openshift_cloud_provider/meta/main.yml b/roles/openshift_cloud_provider/meta/main.yml index 8ab95bf5a..e49cc4430 100644 --- a/roles/openshift_cloud_provider/meta/main.yml +++ b/roles/openshift_cloud_provider/meta/main.yml @@ -13,3 +13,4 @@ galaxy_info: - cloud dependencies: - role: openshift_facts +- role: lib_utils -- cgit v1.2.3 From 955a79c5c411e38d3858448aad1bcbca6c9a3773 Mon Sep 17 00:00:00 2001 From: Joel Pearson Date: Tue, 17 Oct 2017 08:48:39 +1100 Subject: Add blockstorage version for openstack --- roles/openshift_cloud_provider/templates/openstack.conf.j2 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'roles/openshift_cloud_provider') diff --git a/roles/openshift_cloud_provider/templates/openstack.conf.j2 b/roles/openshift_cloud_provider/templates/openstack.conf.j2 index 313ee02b4..30f18ffa9 100644 --- a/roles/openshift_cloud_provider/templates/openstack.conf.j2 +++ b/roles/openshift_cloud_provider/templates/openstack.conf.j2 @@ -19,3 +19,7 @@ region = {{ openshift_cloudprovider_openstack_region }} [LoadBalancer] subnet-id = {{ openshift_cloudprovider_openstack_lb_subnet_id }} {% endif %} +{% if openshift_cloudprovider_openstack_blockstorage_version is defined %} +[BlockStorage] +bs-version={{ openshift_cloudprovider_openstack_blockstorage_version }} +{% endif %} \ No newline at end of file -- cgit v1.2.3