Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ansible Tasks order #11117

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build-scripts/generate_profile_remediations.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/python3

import argparse
import collections
import os
import re
import xml.etree.ElementTree as ET
Expand Down Expand Up @@ -192,7 +193,7 @@ def get_benchmark_data(self):
self.variables = get_all_variables(benchmark)

def load_all_remediations(self, benchmark):
self.remediations = {}
self.remediations = collections.OrderedDict()
rule_xpath = ".//{%s}Rule" % (XCCDF12_NS)
for rule_el in benchmark.findall(rule_xpath):
rule_id = rule_el.get("id")
Expand Down Expand Up @@ -238,7 +239,7 @@ def create_output_ansible(self, profile_el):
def collect_ansible_vars_and_tasks(self, profile_el):
selected_rules = get_selected_rules(profile_el)
refinements = get_value_refinenements(profile_el)
all_vars = {}
all_vars = collections.OrderedDict()
all_tasks = []
for rule_id, fix_el in self.remediations.items():
if rule_id not in selected_rules:
Expand Down
Loading