diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e01f27..2c2dd30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,2 @@ -- INTERNAL - - migrate to thegeeklab namespace +- BUGFIX + - fix missing `__ansible_action_meta__` in normalized tasks (https://github.com/thegeeklab/ansible-later/issues/37) diff --git a/ansiblelater/rules/ansiblefiles.py b/ansiblelater/rules/ansiblefiles.py index 9e13f07..53007cf 100644 --- a/ansiblelater/rules/ansiblefiles.py +++ b/ansiblelater/rules/ansiblefiles.py @@ -194,7 +194,7 @@ def check_command_has_changes(candidate, settings): if task["action"]["__ansible_module__"] in commands: if ( "changed_when" not in task and "when" not in task - and "when" not in task["__ansible_action_meta__"] + and "when" not in task.get("__ansible_action_meta__", []) and "creates" not in task["action"] and "removes" not in task["action"] ): errors.append(Error(task["__line__"], description))