Skip to content
Snippets Groups Projects
Unverified Commit b7ed9ecf authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman Committed by GitHub
Browse files

Merge pull request #1324 from t-woerner/no_role_plugin_duplicates

utils/build-galaxy-release.sh: Do not create duplicates for role plugins
parents 227c95e6 a4f60885
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,9 @@ ...@@ -23,7 +23,9 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type # pylint: disable=invalid-name # pylint: disable=invalid-name
__metaclass__ = type
# pylint: enable=invalid-name
__all__ = ["IPAChangeConf", "certmonger", "sysrestore", "root_logger", __all__ = ["IPAChangeConf", "certmonger", "sysrestore", "root_logger",
"ipa_generate_password", "run", "ScriptError", "services", "ipa_generate_password", "run", "ScriptError", "services",
......
...@@ -140,21 +140,18 @@ sed -i -e "s/ansible.module_utils.ansible_freeipa_module/ansible_collections.${c ...@@ -140,21 +140,18 @@ sed -i -e "s/ansible.module_utils.ansible_freeipa_module/ansible_collections.${c
python utils/create_action_group.py "meta/runtime.yml" "$collection_prefix" python utils/create_action_group.py "meta/runtime.yml" "$collection_prefix"
(cd plugins/module_utils && { mv roles/*/module_utils/*.py plugins/module_utils/
ln -sf ../../roles/*/module_utils/*.py . rmdir roles/*/module_utils
})
(cd plugins/modules && { sed -i -e "s/ansible.module_utils.ansible_ipa_/ansible_collections.${collection_prefix}.plugins.module_utils.ansible_ipa_/" roles/*/library/*.py
sed -i -e "s/ansible.module_utils.ansible_ipa_/ansible_collections.${collection_prefix}.plugins.module_utils.ansible_ipa_/" ../../roles/*/library/*.py mv roles/*/library/*.py plugins/modules/
ln -sf ../../roles/*/library/*.py . rmdir roles/*/library
})
# There are no action plugins anymore in the roles, therefore this section # There are no action plugins anymore in the roles, therefore this section
# is commneted out. # is commneted out.
#[ ! -x plugins/action ] && mkdir plugins/action #[ ! -x plugins/action ] && mkdir plugins/action
#(cd plugins/action && { #mv roles/*/action_plugins/*.py plugins/action/
# ln -sf ../../roles/*/action_plugins/*.py . #rmdir roles/*/action_plugins
#})
# Adapt inventory plugin and inventory plugin README # Adapt inventory plugin and inventory plugin README
echo "Fixing inventory plugin and doc..." echo "Fixing inventory plugin and doc..."
...@@ -181,19 +178,11 @@ find plugins/modules -name "*.py" -print0 | ...@@ -181,19 +178,11 @@ find plugins/modules -name "*.py" -print0 |
done done
echo -e "\033[AFixing examples in plugins/modules... \033[32;1mDONE\033[0m" echo -e "\033[AFixing examples in plugins/modules... \033[32;1mDONE\033[0m"
echo "Fixing examples in roles/*/library..."
find roles/*/library -name "*.py" -print0 |
while IFS= read -d '' -r line; do
python utils/galaxyfy-module-EXAMPLES.py "$line" \
"ipa" "$collection_prefix"
done
echo -e "\033[AFixing examples in roles/*/library... \033[32;1mDONE\033[0m"
echo "Fixing playbooks in roles/*/tasks..." echo "Fixing playbooks in roles/*/tasks..."
for line in roles/*/tasks/*.yml; do for line in roles/*/tasks/*.yml; do
python utils/galaxyfy-playbook.py "$line" "ipa" "$collection_prefix" python utils/galaxyfy-playbook.py "$line" "ipa" "$collection_prefix"
done done
echo -e "\033[AFixing playbooks in roles/*tasks... \033[32;1mDONE\033[0m" echo -e "\033[AFixing playbooks in roles/*/tasks... \033[32;1mDONE\033[0m"
echo "Fixing playbooks in playbooks..." echo "Fixing playbooks in playbooks..."
find playbooks -name "*.yml" -print0 | find playbooks -name "*.yml" -print0 |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment