diff --git a/CHANGELOG.md b/CHANGELOG.md index 39cfd4b..2266a74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,2 @@ -* INTERNAL - * maintenance and refactoring release, no changes +* BUGFIX + * encode module arguments to fix comparison diff --git a/ansiblelater/rules/yamlfiles.py b/ansiblelater/rules/yamlfiles.py index e001599..b968d47 100644 --- a/ansiblelater/rules/yamlfiles.py +++ b/ansiblelater/rules/yamlfiles.py @@ -35,7 +35,10 @@ def check_native_yaml(candidate, settings): break action = normal_form["action"]["__ansible_module__"] - arguments = normal_form["action"]["__ansible_arguments__"] + arguments = [ + bytes(x, "utf-8").decode("unicode_escape") + for x in normal_form["action"]["__ansible_arguments__"] + ] # Cope with `set_fact` where task["set_fact"] is None if not task.get(action): continue