From 91f4c37ed7498427776e933c0173df91226ef59f Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Mon, 31 Jul 2017 10:06:12 -0700 Subject: [PATCH] rename legacy PS module_utils to remove PowerShell prefix (#27495) --- lib/ansible/executor/module_common.py | 2 +- ...ls.PowerShellLegacy.psm1 => Ansible.ModuleUtils.Legacy.psm1} | 0 .../targets/win_module_utils/library/camel_conversion_test.ps1 | 2 +- .../targets/win_module_utils/library/legacy_only_new_way.ps1 | 2 +- .../targets/win_module_utils/library/uses_local_utils.ps1 | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename lib/ansible/module_utils/powershell/{Ansible.ModuleUtils.PowerShellLegacy.psm1 => Ansible.ModuleUtils.Legacy.psm1} (100%) diff --git a/lib/ansible/executor/module_common.py b/lib/ansible/executor/module_common.py index f4a3357f0da..c8ba1c27d32 100644 --- a/lib/ansible/executor/module_common.py +++ b/lib/ansible/executor/module_common.py @@ -791,7 +791,7 @@ def _find_module_utils(module_name, b_module_data, module_path, module_args, tas for line in lines: # legacy, equivalent to #Requires -Modules powershell if REPLACER_WINDOWS in line: - module_names.add(b'Ansible.ModuleUtils.PowerShellLegacy') + module_names.add(b'Ansible.ModuleUtils.Legacy') line_match = requires_module_list.match(line) if line_match: module_names.add(line_match.group(1)) diff --git a/lib/ansible/module_utils/powershell/Ansible.ModuleUtils.PowerShellLegacy.psm1 b/lib/ansible/module_utils/powershell/Ansible.ModuleUtils.Legacy.psm1 similarity index 100% rename from lib/ansible/module_utils/powershell/Ansible.ModuleUtils.PowerShellLegacy.psm1 rename to lib/ansible/module_utils/powershell/Ansible.ModuleUtils.Legacy.psm1 diff --git a/test/integration/targets/win_module_utils/library/camel_conversion_test.ps1 b/test/integration/targets/win_module_utils/library/camel_conversion_test.ps1 index bfefe7fd014..d8d704f5aab 100644 --- a/test/integration/targets/win_module_utils/library/camel_conversion_test.ps1 +++ b/test/integration/targets/win_module_utils/library/camel_conversion_test.ps1 @@ -1,6 +1,6 @@ #!powershell -#Requires -Module Ansible.ModuleUtils.PowerShellLegacy +#Requires -Module Ansible.ModuleUtils.Legacy #Requires -Module Ansible.ModuleUtils.CamelConversion $ErrorActionPreference = 'Continue' diff --git a/test/integration/targets/win_module_utils/library/legacy_only_new_way.ps1 b/test/integration/targets/win_module_utils/library/legacy_only_new_way.ps1 index 9a90fc44bb4..8ea3e061975 100644 --- a/test/integration/targets/win_module_utils/library/legacy_only_new_way.ps1 +++ b/test/integration/targets/win_module_utils/library/legacy_only_new_way.ps1 @@ -1,5 +1,5 @@ #!powershell -#Requires -Module Ansible.ModuleUtils.PowerShellLegacy +#Requires -Module Ansible.ModuleUtils.Legacy Exit-Json @{ data="success" } diff --git a/test/integration/targets/win_module_utils/library/uses_local_utils.ps1 b/test/integration/targets/win_module_utils/library/uses_local_utils.ps1 index 4b22a67e027..3dfc940c17e 100644 --- a/test/integration/targets/win_module_utils/library/uses_local_utils.ps1 +++ b/test/integration/targets/win_module_utils/library/uses_local_utils.ps1 @@ -1,7 +1,7 @@ #!powershell # use different cases, spacing and plural of 'module' to exercise flexible powershell dialect -#ReQuiReS -ModUleS Ansible.ModuleUtils.PowerShellLegacy +#ReQuiReS -ModUleS Ansible.ModuleUtils.Legacy #Requires -Module Ansible.ModuleUtils.ValidTestModule $o = CustomFunction