|
|
@ -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: |
|
|
|