Enable gather facts; Fix typo and conditional;Add missing manifests;Initialize cluster API
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
838c7b6361
commit
b47dda7a50
@ -1,7 +1,7 @@
|
||||
---
|
||||
- hosts: 127.0.0.1
|
||||
connection: local
|
||||
gather_facts: false
|
||||
gather_facts: true
|
||||
vars_files:
|
||||
- metacluster.yml
|
||||
# become: true
|
||||
|
@ -27,3 +27,8 @@
|
||||
publickey: "{{ vapp['guestinfo.rootsshkey'] }}"
|
||||
version: "{{ components.clusterapi.workload.version.k8s }}"
|
||||
vip: "{{ vapp['workloadcluster.vip'] }}"
|
||||
|
||||
- name: Initialize Cluster API management cluster
|
||||
ansible.builtin.shell:
|
||||
cmd: clusterctl init -v5 -i vsphere:{{ components.clusterapi.management.version.infrastructure_vsphere }} --config ./clusterctl.yaml
|
||||
chdir: /opt/metacluster/manifests
|
||||
|
@ -42,7 +42,8 @@
|
||||
folder: "{{ vcenter_info.folder }}"
|
||||
name: "{{ item.instance.hw_name }}"
|
||||
state: present
|
||||
snapshot_name: "{{ ansible_date_time..iso8601_basic_short }}-base"
|
||||
snapshot_name: "{{ ansible_date_time.iso8601_basic_short }}-base"
|
||||
when: ova_deploy.results[index] is not skipped
|
||||
loop: "{{ ova_deploy.results }}"
|
||||
loop_control:
|
||||
index_var: index
|
||||
|
@ -51,24 +51,27 @@
|
||||
register: clusterapi_manifests
|
||||
loop:
|
||||
# This list is based on `clusterctl config repositories`
|
||||
# Note: Each manifest also needs a metadata.yaml file stored in the respective folder
|
||||
# Note: Each manifest also needs a `metadata.yaml` file stored in the respective folder
|
||||
- url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.management.version.base }}/bootstrap-components.yaml
|
||||
dest: bootstrap-kubeadm/{{ components.clusterapi.management.version.base }}/bootstrap-components.yaml
|
||||
- url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.management.version.base }}/core-components.yaml
|
||||
dest: cluster-api/{{ components.clusterapi.management.version.base }}/core-components.yaml
|
||||
- url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.management.version.base }}/control-plane-components.yaml
|
||||
dest: control-plane-kubeadm/{{ components.clusterapi.management.version.base }}/control-plane-components.yaml
|
||||
- url: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{{ components.clusterapi.management.version.infrastructure_vsphere }}/infrastructure-components.yaml
|
||||
dest: infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}/infrastructure-components.yaml
|
||||
- url: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{{ components.clusterapi.management.version.infrastructure_vsphere }}/metadata.yaml
|
||||
dest: infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}/metadata.yaml
|
||||
# This downloads the same metadata.yaml file to three separate folders
|
||||
# This downloads the same `metadata.yaml` file to three separate folders
|
||||
- url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.management.version.base }}/metadata.yaml
|
||||
dest: bootstrap-kubeadm/{{ components.clusterapi.management.version.base }}/metadata.yaml
|
||||
- url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.management.version.base }}/metadata.yaml
|
||||
dest: cluster-api/{{ components.clusterapi.management.version.base }}/metadata.yaml
|
||||
- url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.management.version.base }}/metadata.yaml
|
||||
dest: control-plane-kubeadm/{{ components.clusterapi.management.version.base }}/metadata.yaml
|
||||
# The vsphere infrastructure provider requires multiple files (`cluster-template.yaml` and `metadata.yaml` on top of default files)
|
||||
- url: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{{ components.clusterapi.management.version.infrastructure_vsphere }}/infrastructure-components.yaml
|
||||
dest: infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}/infrastructure-components.yaml
|
||||
- url: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{{ components.clusterapi.management.version.infrastructure_vsphere }}/cluster-template.yaml
|
||||
dest: infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}/cluster-template.yaml
|
||||
- url: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{{ components.clusterapi.management.version.infrastructure_vsphere }}/metadata.yaml
|
||||
dest: infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}/metadata.yaml
|
||||
# Additionally, cert-manager is a prerequisite
|
||||
- url: https://github.com/cert-manager/cert-manager/releases/download/{{ components.clusterapi.management.version.cert_manager }}/cert-manager.yaml
|
||||
dest: cert-manager/{{ components.clusterapi.management.version.cert_manager }}/cert-manager.yaml
|
||||
|
Loading…
Reference in New Issue
Block a user