Skip to content
Snippets Groups Projects
Commit b7608638 authored by Thomas Woerner's avatar Thomas Woerner
Browse files

utils/get_test_modules.py: Support ansible.builtin. prefix

The ansible.builtin. prefix was not supported. Therefore tasks have not
been identified properly.
parent e3bf82d8
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,9 @@ def get_plugins_from_playbook(playbook):
task = task.split(".")[-1]
if task == "block":
_result.update(get_tasks(tasks["block"]))
elif task in ["include_tasks", "import_tasks"]:
elif task in ["include_tasks", "import_tasks"
"ansible.builtin.include_tasks",
"ansible.builtin.import_tasks"]:
parent = os.path.dirname(playbook)
include_task = tasks[task]
if isinstance(include_task, dict):
......@@ -37,7 +39,8 @@ def get_plugins_from_playbook(playbook):
else:
include_file = os.path.join(parent, include_task)
_result.update(get_plugins_from_playbook(include_file))
elif task == "include_role":
elif task in ["include_role",
"ansible.builtin.include_role"]:
_result.add(f"_{tasks[original_task]['name']}")
elif task.startswith("ipa"):
# assume we are only interested in 'ipa*' modules/roles
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment