From 6f0b3c247b8a3ef42ebb4c92c8d98ffcf1bd15f0 Mon Sep 17 00:00:00 2001 From: Jason Montleon Date: Thu, 6 Jun 2024 13:43:11 -0400 Subject: [PATCH] :ghost: Use k8s_cluster_info instead of k8s, cluster_info Signed-off-by: Jason Montleon --- roles/tackle/tasks/main.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/roles/tackle/tasks/main.yml b/roles/tackle/tasks/main.yml index bb5093a..1e2e0ec 100644 --- a/roles/tackle/tasks/main.yml +++ b/roles/tackle/tasks/main.yml @@ -1,7 +1,16 @@ --- +- name: "Get Cluster information" + kubernetes.core.k8s_cluster_info: + register: api_status + +- name: "Create cluster API group list" + set_fact: + api_groups: [] + - name: "Load cluster API groups" set_fact: - api_groups: "{{ lookup('k8s', cluster_info='api_groups') }}" + api_groups: "{{ (api_groups + [(item | regex_replace('/?v\\d.*'))]) | unique }}" + with_items: "{{ api_status.apis | list }}" - name: "Transfer rwx_storage_class setting if hub_bucket_storage_class is not defined" set_fact: