Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ansible FreeIPA
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Ansible FreeIPA
Commits
f8b58516
Unverified
Commit
f8b58516
authored
Jan 9, 2023
by
Rafael Guterres Jeffman
Committed by
GitHub
Jan 9, 2023
Browse files
Options
Downloads
Plain Diff
Merge pull request #1016 from t-woerner/galaxyfy_ansible_builtin
utils files: Support builtins with ansible.builtin. prefix
parents
76ca587d
b7608638
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
utils/galaxyfy.py
+3
-2
3 additions, 2 deletions
utils/galaxyfy.py
utils/get_test_modules.py
+5
-2
5 additions, 2 deletions
utils/get_test_modules.py
with
8 additions
and
4 deletions
utils/galaxyfy.py
+
3
−
2
View file @
f8b58516
...
...
@@ -39,13 +39,14 @@ def galaxyfy_playbook(project_prefix, collection_prefix, lines):
if
stripped
.
startswith
(
"
- name:
"
)
or
\
stripped
.
startswith
(
"
- block:
"
):
changeable
=
True
elif
stripped
in
[
"
set_fact:
"
,
"
vars:
"
]:
elif
stripped
in
[
"
set_fact:
"
,
"
ansible.builtin.set_fact:
"
,
"
vars:
"
]:
changeable
=
False
include_role
=
False
elif
stripped
==
"
roles:
"
:
changeable
=
True
include_role
=
False
elif
stripped
.
startswith
(
"
include_role:
"
):
elif
(
stripped
.
startswith
(
"
include_role:
"
)
or
stripped
.
startswith
(
"
ansible.builtin.include_role:
"
)):
include_role
=
True
elif
include_role
and
stripped
.
startswith
(
"
name:
"
):
line
=
po2
.
sub
(
pattern2
,
line
)
...
...
This diff is collapsed.
Click to expand it.
utils/get_test_modules.py
+
5
−
2
View file @
f8b58516
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment