Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggallen committed Oct 10, 2022
1 parent ee7669a commit e0708ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
4 changes: 1 addition & 3 deletions filter_plugins/k8s_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from ansible.utils.display import Display
from ansible import constants as C
from collections import OrderedDict
import os

display = Display()
Expand All @@ -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:
Expand Down
16 changes: 2 additions & 14 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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 }}"
Expand Down

0 comments on commit e0708ee

Please sign in to comment.