diff --git a/changelogs/fragments/57030-facts-info-rename.yaml b/changelogs/fragments/57030-facts-info-rename.yaml new file mode 100644 index 00000000000..45f9aab1f85 --- /dev/null +++ b/changelogs/fragments/57030-facts-info-rename.yaml @@ -0,0 +1,3 @@ +minor_changes: +- The ``memset_memstore_facts`` module has been renamed to ``memset_memstore_info``. +- The ``memset_server_facts`` module has been renamed to ``memset_server_info``. diff --git a/docs/docsite/rst/porting_guides/porting_guide_2.9.rst b/docs/docsite/rst/porting_guides/porting_guide_2.9.rst index e92b8bf4798..47965d5b782 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.9.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.9.rst @@ -75,6 +75,8 @@ Noteworthy module changes * The ``k8s_facts`` module was renamed to :ref:`k8s_info `. * The ``bigip_device_facts`` module was renamed to :ref:`bigip_device_info `. * The ``bigiq_device_facts`` module was renamed to :ref:`bigiq_device_info `. +* The ``memset_memstore_facts`` module was renamed to :ref:`memset_memstore_info `. +* The ``memset_server_facts`` module was renamed to :ref:`memset_server_info `. * The ``one_image_facts`` module was renamed to :ref:`one_image_info `. diff --git a/lib/ansible/modules/cloud/memset/_memset_memstore_facts.py b/lib/ansible/modules/cloud/memset/_memset_memstore_facts.py new file mode 120000 index 00000000000..aa78805717c --- /dev/null +++ b/lib/ansible/modules/cloud/memset/_memset_memstore_facts.py @@ -0,0 +1 @@ +memset_memstore_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/memset/_memset_server_facts.py b/lib/ansible/modules/cloud/memset/_memset_server_facts.py new file mode 120000 index 00000000000..0a5766aee43 --- /dev/null +++ b/lib/ansible/modules/cloud/memset/_memset_server_facts.py @@ -0,0 +1 @@ +memset_server_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/memset/memset_memstore_facts.py b/lib/ansible/modules/cloud/memset/memset_memstore_info.py similarity index 93% rename from lib/ansible/modules/cloud/memset/memset_memstore_facts.py rename to lib/ansible/modules/cloud/memset/memset_memstore_info.py index 13c706427b8..cd829a2694f 100644 --- a/lib/ansible/modules/cloud/memset/memset_memstore_facts.py +++ b/lib/ansible/modules/cloud/memset/memset_memstore_info.py @@ -15,7 +15,7 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: memset_memstore_facts +module: memset_memstore_info author: "Simon Weald (@glitchcrab)" version_added: "2.8" short_description: Retrieve Memstore product usage information. @@ -24,6 +24,7 @@ notes: following minimum scope - I(memstore.usage). description: - Retrieve Memstore product usage information. + - This module was called C(memset_memstore_facts) before Ansible 2.9. The usage did not change. options: api_key: required: true @@ -37,7 +38,7 @@ options: EXAMPLES = ''' - name: get usage for mstestyaa1 - memset_memstore_facts: + memset_memstore_info: name: mstestyaa1 api_key: 5eb86c9896ab03919abcf03857163741 delegate_to: localhost @@ -155,6 +156,8 @@ def main(): ), supports_check_mode=False ) + if module._name == 'memset_memstore_facts': + module.deprecate("The 'memset_memstore_facts' module has been renamed to 'memset_memstore_info'", version='2.13') # populate the dict with the user-provided vars. args = dict() diff --git a/lib/ansible/modules/cloud/memset/memset_server_facts.py b/lib/ansible/modules/cloud/memset/memset_server_info.py similarity index 96% rename from lib/ansible/modules/cloud/memset/memset_server_facts.py rename to lib/ansible/modules/cloud/memset/memset_server_info.py index 30212228a8b..7642a053922 100644 --- a/lib/ansible/modules/cloud/memset/memset_server_facts.py +++ b/lib/ansible/modules/cloud/memset/memset_server_info.py @@ -15,7 +15,7 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: memset_server_facts +module: memset_server_info author: "Simon Weald (@glitchcrab)" version_added: "2.8" short_description: Retrieve server information. @@ -24,6 +24,7 @@ notes: following minimum scope - I(server.info). description: - Retrieve server information. + - This module was called C(memset_server_facts) before Ansible 2.9. The usage did not change. options: api_key: required: true @@ -37,7 +38,7 @@ options: EXAMPLES = ''' - name: get details for testyaa1 - memset_server_facts: + memset_server_info: name: testyaa1 api_key: 5eb86c9896ab03919abcf03857163741 delegate_to: localhost @@ -280,6 +281,8 @@ def main(): ), supports_check_mode=False ) + if module._name == 'memset_server_facts': + module.deprecate("The 'memset_server_facts' module has been renamed to 'memset_server_info'", version='2.13') # populate the dict with the user-provided vars. args = dict() diff --git a/test/integration/targets/memset_memstore_facts/aliases b/test/integration/targets/memset_memstore_info/aliases similarity index 100% rename from test/integration/targets/memset_memstore_facts/aliases rename to test/integration/targets/memset_memstore_info/aliases diff --git a/test/integration/targets/memset_memstore_facts/meta/main.yml b/test/integration/targets/memset_memstore_info/meta/main.yml similarity index 100% rename from test/integration/targets/memset_memstore_facts/meta/main.yml rename to test/integration/targets/memset_memstore_info/meta/main.yml diff --git a/test/integration/targets/memset_memstore_facts/tasks/main.yml b/test/integration/targets/memset_memstore_info/tasks/main.yml similarity index 86% rename from test/integration/targets/memset_memstore_facts/tasks/main.yml rename to test/integration/targets/memset_memstore_info/tasks/main.yml index a897c529d67..a26e7dba6a7 100644 --- a/test/integration/targets/memset_memstore_facts/tasks/main.yml +++ b/test/integration/targets/memset_memstore_info/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: query API with invalid API key - memset_memstore_facts: + memset_memstore_info: api_key: 'wa9aerahhie0eekee9iaphoorovooyia' name: 'mstestyaa1' ignore_errors: true @@ -12,8 +12,8 @@ - "'Memset API returned a 403 response (ApiErrorForbidden, Bad api_key)' in result.msg" - result is not successful -- name: request memstore facts - memset_memstore_facts: +- name: request memstore infos + memset_memstore_info: api_key: "{{ api_key }}" name: 'mstestyaa1' register: result diff --git a/test/integration/targets/memset_server_facts/aliases b/test/integration/targets/memset_server_info/aliases similarity index 100% rename from test/integration/targets/memset_server_facts/aliases rename to test/integration/targets/memset_server_info/aliases diff --git a/test/integration/targets/memset_server_facts/meta/main.yml b/test/integration/targets/memset_server_info/meta/main.yml similarity index 100% rename from test/integration/targets/memset_server_facts/meta/main.yml rename to test/integration/targets/memset_server_info/meta/main.yml diff --git a/test/integration/targets/memset_server_facts/tasks/main.yml b/test/integration/targets/memset_server_info/tasks/main.yml similarity index 87% rename from test/integration/targets/memset_server_facts/tasks/main.yml rename to test/integration/targets/memset_server_info/tasks/main.yml index ad5dbfe0800..86de45f2b03 100644 --- a/test/integration/targets/memset_server_facts/tasks/main.yml +++ b/test/integration/targets/memset_server_info/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: query API with invalid API key - memset_server_facts: + memset_server_info: api_key: 'wa9aerahhie0eekee9iaphoorovooyia' name: 'testyaa1' ignore_errors: true @@ -12,8 +12,8 @@ - "'Memset API returned a 403 response (ApiErrorForbidden, Bad api_key)' in result.msg" - result is not successful -- name: request server facts - memset_server_facts: +- name: request server infos + memset_server_info: api_key: "{{ api_key }}" name: 'testyaa1' register: result