diff --git a/changelogs/fragments/57668-gcpubsub-facts-info.yaml b/changelogs/fragments/57668-gcpubsub-facts-info.yaml new file mode 100644 index 00000000000..6ffbf9af759 --- /dev/null +++ b/changelogs/fragments/57668-gcpubsub-facts-info.yaml @@ -0,0 +1,2 @@ +minor_changes: +- The ``gcpubsub_facts`` module has been renamed to ``gcpubsub_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 08aeec1ad89..c6e977270a4 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.9.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.9.rst @@ -94,6 +94,7 @@ Noteworthy module changes * The ``ali_instance_facts`` module was renamed to :ref:`ali_instance_info `. * The ``xenserver_guest_facts`` module was renamed to :ref:`xenserver_guest_info `. * The ``azure_rm_resourcegroup_facts`` module was renamed to :ref:`azure_rm_resourcegroup_info `. +* The ``gcpubsub_facts`` module was renamed to :ref:`gcpubsub_info `. * The ``digital_ocean_account_facts`` module was renamed to :ref:`digital_ocean_account_info `. * The ``digital_ocean_certificate_facts`` module was renamed to :ref:`digital_ocean_certificate_info `. * The ``digital_ocean_domain_facts`` module was renamed to :ref:`digital_ocean_domain_info `. diff --git a/lib/ansible/modules/cloud/google/_gcpubsub_facts.py b/lib/ansible/modules/cloud/google/_gcpubsub_facts.py new file mode 120000 index 00000000000..3feb35c3ee5 --- /dev/null +++ b/lib/ansible/modules/cloud/google/_gcpubsub_facts.py @@ -0,0 +1 @@ +gcpubsub_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/google/gcpubsub_facts.py b/lib/ansible/modules/cloud/google/gcpubsub_info.py similarity index 93% rename from lib/ansible/modules/cloud/google/gcpubsub_facts.py rename to lib/ansible/modules/cloud/google/gcpubsub_info.py index 6b687c1b7a4..11b1f75b628 100644 --- a/lib/ansible/modules/cloud/google/gcpubsub_facts.py +++ b/lib/ansible/modules/cloud/google/gcpubsub_info.py @@ -13,13 +13,14 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: gcpubsub_facts +module: gcpubsub_info version_added: "2.3" short_description: List Topics/Subscriptions and Messages from Google PubSub. description: - List Topics/Subscriptions from Google PubSub. Use the gcpubsub module for topic/subscription management. See U(https://cloud.google.com/pubsub/docs) for an overview. + - This module was called C(gcpubsub_facts) before Ansible 2.9. The usage did not change. requirements: - "python >= 2.6" - "google-auth >= 0.5.0" @@ -45,17 +46,17 @@ options: EXAMPLES = ''' ## List all Topics in a project -- gcpubsub_facts: +- gcpubsub_info: view: topics state: list ## List all Subscriptions in a project -- gcpubsub_facts: +- gcpubsub_info: view: subscriptions state: list ## List all Subscriptions for a Topic in a project -- gcpubsub_facts: +- gcpubsub_info: view: subscriptions topic: my-topic state: list @@ -108,6 +109,8 @@ def main(): service_account_email=dict(), credentials_file=dict(), project_id=dict(), ),) + if module._name == 'gcpubsub_facts': + module.deprecate("The 'gcpubsub_facts' module has been renamed to 'gcpubsub_info'", version='2.13') if not HAS_PYTHON26: module.fail_json( diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index 7e89e0b397f..3ecd20e362c 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -1555,10 +1555,10 @@ lib/ansible/modules/cloud/google/gcp_dns_managed_zone_facts.py validate-modules: lib/ansible/modules/cloud/google/gcpubsub.py validate-modules:E322 lib/ansible/modules/cloud/google/gcpubsub.py validate-modules:E323 lib/ansible/modules/cloud/google/gcpubsub.py validate-modules:E337 -lib/ansible/modules/cloud/google/gcpubsub_facts.py validate-modules:E322 -lib/ansible/modules/cloud/google/gcpubsub_facts.py validate-modules:E324 -lib/ansible/modules/cloud/google/gcpubsub_facts.py validate-modules:E326 -lib/ansible/modules/cloud/google/gcpubsub_facts.py validate-modules:E338 +lib/ansible/modules/cloud/google/gcpubsub_info.py validate-modules:E322 +lib/ansible/modules/cloud/google/gcpubsub_info.py validate-modules:E324 +lib/ansible/modules/cloud/google/gcpubsub_info.py validate-modules:E326 +lib/ansible/modules/cloud/google/gcpubsub_info.py validate-modules:E338 lib/ansible/modules/cloud/hcloud/hcloud_image_facts.py validate-modules:E338 lib/ansible/modules/cloud/heroku/heroku_collaborator.py validate-modules:E337 lib/ansible/modules/cloud/kubevirt/kubevirt_cdi_upload.py validate-modules:E338