mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-01 12:24:43 +00:00
utils/galaxyfy.py: Support builtins with ansible.builtin. prefix
The ansible builtins are using the ansible.builtin. prefix now, but galaxyfy was not supporting the prefix. Therefore vars in set_fact tasks got the collection prefix and include_role tasks have not been handled correctly.
This commit is contained in:
@@ -39,13 +39,14 @@ def galaxyfy_playbook(project_prefix, collection_prefix, lines):
|
|||||||
if stripped.startswith("- name:") or \
|
if stripped.startswith("- name:") or \
|
||||||
stripped.startswith("- block:"):
|
stripped.startswith("- block:"):
|
||||||
changeable = True
|
changeable = True
|
||||||
elif stripped in ["set_fact:", "vars:"]:
|
elif stripped in ["set_fact:", "ansible.builtin.set_fact:", "vars:"]:
|
||||||
changeable = False
|
changeable = False
|
||||||
include_role = False
|
include_role = False
|
||||||
elif stripped == "roles:":
|
elif stripped == "roles:":
|
||||||
changeable = True
|
changeable = True
|
||||||
include_role = False
|
include_role = False
|
||||||
elif stripped.startswith("include_role:"):
|
elif (stripped.startswith("include_role:") or
|
||||||
|
stripped.startswith("ansible.builtin.include_role:")):
|
||||||
include_role = True
|
include_role = True
|
||||||
elif include_role and stripped.startswith("name:"):
|
elif include_role and stripped.startswith("name:"):
|
||||||
line = po2.sub(pattern2, line)
|
line = po2.sub(pattern2, line)
|
||||||
|
|||||||
Reference in New Issue
Block a user