Initial support for vsphere as cloud provider

This commit is contained in:
Jan Jungnickel
2016-11-07 12:11:16 +01:00
committed by Brad Beam
parent 27b4e61c9f
commit df476b0088
7 changed files with 62 additions and 9 deletions

View File

@@ -64,8 +64,8 @@
- name: check cloud_provider value
fail:
msg: "If set the 'cloud_provider' var must be set either to 'generic', 'gce', 'aws', 'azure' or 'openstack'"
when: cloud_provider is defined and cloud_provider not in ['generic', 'gce', 'aws', 'openstack', 'azure']
msg: "If set the 'cloud_provider' var must be set either to 'generic', 'gce', 'aws', 'azure', 'vsphere', or 'openstack'"
when: cloud_provider is defined and cloud_provider not in ['generic', 'gce', 'aws', 'openstack', 'azure', 'vsphere']
tags: [cloud-provider, facts]
- include: openstack-credential-check.yml
@@ -76,6 +76,10 @@
when: cloud_provider is defined and cloud_provider == 'azure'
tags: [cloud-provider, azure, facts]
- include: vsphere-credential-check.yml
when: cloud_provider is defined and cloud_provider == 'vsphere'
tags: [cloud-provider, vsphere, facts]
- name: Create cni directories
file:
path: "{{ item }}"
@@ -179,14 +183,14 @@
state: present
tags: bootstrap-os
- name: Write openstack cloud-config
- name: "Write {{ cloud_provider}} cloud-config"
template:
src: openstack-cloud-config.j2
src: "{{ cloud_provider }}-cloud-config.j2"
dest: "{{ kube_config_dir }}/cloud_config"
group: "{{ kube_cert_group }}"
mode: 0640
when: inventory_hostname in groups['k8s-cluster'] and cloud_provider is defined and cloud_provider == "openstack"
tags: [cloud-provider, openstack]
when: inventory_hostname in groups['k8s-cluster'] and cloud_provider is defined and cloud_provider in [ "openstack", "vsphere" ]
tags: [cloud-provider, openstack, vsphere]
- name: Write azure cloud-config
template: