diff --git a/changelogs/fragments/185-core-modules.yml b/changelogs/fragments/185-core-modules.yml new file mode 100644 index 00000000..456adcd1 --- /dev/null +++ b/changelogs/fragments/185-core-modules.yml @@ -0,0 +1,2 @@ +bugfixes: + - "Fix ``namespace`` extraction for ansible-core modules (https://github.com/ansible-community/antsibull-changelog/issues/184, https://github.com/ansible-community/antsibull-changelog/pull/185)." diff --git a/src/antsibull_changelog/plugins.py b/src/antsibull_changelog/plugins.py index b71d3325..9369cf70 100644 --- a/src/antsibull_changelog/plugins.py +++ b/src/antsibull_changelog/plugins.py @@ -159,7 +159,7 @@ def jsondoc_to_metadata( # pylint: disable=too-many-arguments docs = entrypoints["main"] if category == "plugin" and plugin_type == "module": if is_ansible_core_2_13: - last_dot = name.rindex(".") + last_dot = name.rfind(".") if last_dot >= 0: namespace = name[:last_dot] name = name[last_dot + 1 :] @@ -400,6 +400,7 @@ def _load_plugins_2_13( plugin_name, plugin_data, category=category[:-1], + is_ansible_core_2_13=True, ) plugins_data[category][plugin_type][ processed_data["name"]