From e0708eed94c9a5d2fac70f0e5b015f9cf696e1f0 Mon Sep 17 00:00:00 2001 From: Greg Allen Date: Mon, 10 Oct 2022 15:54:39 -0400 Subject: [PATCH] Clean up. --- filter_plugins/k8s_filter.py | 4 +--- tasks/main.yml | 16 ++-------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/filter_plugins/k8s_filter.py b/filter_plugins/k8s_filter.py index 859578f..624790a 100644 --- a/filter_plugins/k8s_filter.py +++ b/filter_plugins/k8s_filter.py @@ -2,7 +2,6 @@ from ansible.utils.display import Display from ansible import constants as C -from collections import OrderedDict import os display = Display() @@ -21,12 +20,11 @@ def k8s_filter(k8s_objects): ] no_log_true = ['Secret'] - resource_files = {} #OrderedDict() + resource_files = {} # order the resources according to what's in resource_order for res in resource_order: for k8s_res in k8s_objects: if selected_object(res, k8s_res): - print("Adding " + k8s_res) if res in no_log_true: resource_files[k8s_res] = True else: diff --git a/tasks/main.yml b/tasks/main.yml index d7eca06..608b7f0 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -40,19 +40,7 @@ import_tasks: order_configs.yml when: k8s_resource_files|length>0 or k8s_resource_dirs|length>0 -- name: Type - debug: - msg: "{{ k8s_secrets | type_debug }}" - -- name: Type - debug: - msg: "{{ k8s_secrets is mapping }}" - -- name: Type - debug: - msg: "{{ k8s_secrets.items() is mapping }}" - -- name: Creating k8s secret objects - greg 1 +- name: Creating k8s secret objects k8s: host: "{{ k8s_auth_host }}" api_key: "{{ k8s_auth_api_key }}" @@ -76,7 +64,7 @@ with_items: "{{ k8s_secrets }}" when: k8s_secrets | type_debug == 'list' -- name: Creating k8s objects - greg 2 +- name: Creating k8s objects k8s: host: "{{ k8s_auth_host }}" api_key: "{{ k8s_auth_api_key }}"