Skip to content

Commit

Permalink
Merge pull request #28 from ggallen/CPAAS-3659
Browse files Browse the repository at this point in the history
Fix ordering mechanism.
  • Loading branch information
ggallen authored Sep 23, 2022
2 parents 6647488 + 5ff3fdb commit 65fa531
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion filter_plugins/k8s_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

display = Display()
Expand All @@ -20,7 +21,7 @@ def k8s_filter(k8s_objects):
]
no_log_true = ['Secret']

resource_files = {}
resource_files = OrderedDict()
# order the resources according to what's in resource_order
for res in resource_order:
for k8s_res in k8s_objects:
Expand Down
4 changes: 2 additions & 2 deletions tasks/order_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

- name: set k8s_secrets with set files
set_fact:
k8s_secrets: "{{ k8s_secret_files | k8s_filter }}"
k8s_secrets: "{{ k8s_secret_files | k8s_filter | list }}"

- name: set k8s_resources with set files
set_fact:
k8s_resources: "{{ k8s_res_files | k8s_filter }}"
k8s_resources: "{{ k8s_res_files | k8s_filter | list }}"

0 comments on commit 65fa531

Please sign in to comment.