From 42d79a95caa970ce2a41c49e22b6e25c11988ec6 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Tue, 8 Nov 2022 20:17:36 +0100 Subject: [PATCH] Merge vars_files --- ansible/playbook.yml | 1 - .../roles/workloadcluster/tasks/clusterapi.yml | 2 +- ansible/roles/metacluster/tasks/staging.yml | 4 ++-- ansible/vars/metacluster.yml | 4 ++++ ansible/vars/workloadcluster.yml | 7 ------- 5 files changed, 7 insertions(+), 11 deletions(-) delete mode 100644 ansible/vars/workloadcluster.yml diff --git a/ansible/playbook.yml b/ansible/playbook.yml index 574072d..a4bf947 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -3,7 +3,6 @@ gather_facts: false vars_files: - metacluster.yml - - workloadcluster.yml become: true roles: - os diff --git a/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/clusterapi.yml b/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/clusterapi.yml index 56be3b3..2f0ca32 100644 --- a/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/clusterapi.yml +++ b/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/clusterapi.yml @@ -23,7 +23,7 @@ network: "{{ vcenter_info.network }}" resourcepool: "{{ vcenter_info.resourcepool }}" cluster: - nodetemplate: "{{ downstream.node_template.image.name }}" + nodetemplate: "{{ components.clusterapi.workload.node_template.name }}" publickey: "{{ vapp['guestinfo.rootsshkey'] }}" version: "{{ components.clusterapi.workload.version.k8s }}" vip: "{{ vapp['workloadcluster.vip'] }}" diff --git a/ansible/roles/metacluster/tasks/staging.yml b/ansible/roles/metacluster/tasks/staging.yml index 4f621c7..c56141e 100644 --- a/ansible/roles/metacluster/tasks/staging.yml +++ b/ansible/roles/metacluster/tasks/staging.yml @@ -14,5 +14,5 @@ - name: Download node-template image ansible.builtin.uri: - url: "{{ downstream.node_template.image.url }}" - dest: /opt/workloadcluster/node-templates/{{ downstream.node_template.image.name }} + url: "{{ components.clusterapi.workload.node_template.url }}" + dest: /opt/workloadcluster/node-templates/{{ components.clusterapi.workload.node_template.name }} diff --git a/ansible/vars/metacluster.yml b/ansible/vars/metacluster.yml index 52db274..d15ec0b 100644 --- a/ansible/vars/metacluster.yml +++ b/ansible/vars/metacluster.yml @@ -87,6 +87,10 @@ components: workload: version: k8s: v1.23.5 + node_template: + # Refer to `https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/v1.3.5/README.md#kubernetes-versions-with-published-ovas` for a list of supported node templates + url: https://storage.googleapis.com/capv-images/release/v1.23.5/ubuntu-2004-kube-v1.23.5.ova + name: ubuntu-2004-kube-v1.23.5.ova gitea: helm: diff --git a/ansible/vars/workloadcluster.yml b/ansible/vars/workloadcluster.yml deleted file mode 100644 index db508e3..0000000 --- a/ansible/vars/workloadcluster.yml +++ /dev/null @@ -1,7 +0,0 @@ -downstream: - - node_template: - image: - # Refer to `https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/v1.3.5/README.md#kubernetes-versions-with-published-ovas` for a list of supported node templates - url: https://storage.googleapis.com/capv-images/release/v1.23.5/ubuntu-2004-kube-v1.23.5.ova - name: ubuntu-2004-kube-v1.23.5.ova