From ed7b98865b308a0292544ee5b2f7ce7b8bd831dc 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 3f3a192..89494fc 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: