diff --git a/changelogs/fragments/57276-facts-info-rename.yaml b/changelogs/fragments/57276-facts-info-rename.yaml new file mode 100644 index 00000000000..ab273b5f278 --- /dev/null +++ b/changelogs/fragments/57276-facts-info-rename.yaml @@ -0,0 +1,13 @@ +minor_changes: +- The ``digital_ocean_account_facts`` module has been renamed to ``digital_ocean_account_info``. +- The ``digital_ocean_certificate_facts`` module has been renamed to ``digital_ocean_certificate_info``. +- The ``digital_ocean_domain_facts`` module has been renamed to ``digital_ocean_domain_info``. +- The ``digital_ocean_firewall_facts`` module has been renamed to ``digital_ocean_firewall_info``. +- The ``digital_ocean_floating_ip_facts`` module has been renamed to ``digital_ocean_floating_ip_info``. +- The ``digital_ocean_image_facts`` module has been renamed to ``digital_ocean_image_info``. +- The ``digital_ocean_load_balancer_facts`` module has been renamed to ``digital_ocean_load_balancer_info``. +- The ``digital_ocean_region_facts`` module has been renamed to ``digital_ocean_region_info``. +- The ``digital_ocean_size_facts`` module has been renamed to ``digital_ocean_size_info``. +- The ``digital_ocean_snapshot_facts`` module has been renamed to ``digital_ocean_snapshot_info``. +- The ``digital_ocean_tag_facts`` module has been renamed to ``digital_ocean_tag_info``. +- The ``digital_ocean_volume_facts`` module has been renamed to ``digital_ocean_volume_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 63ac7884521..14a768d5a61 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.9.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.9.rst @@ -79,6 +79,19 @@ Noteworthy module changes * The ``memset_server_facts`` module was renamed to :ref:`memset_server_info `. * The ``one_image_facts`` module was renamed to :ref:`one_image_info `. * The ``azure_rm_resourcegroup_facts`` module was renamed to :ref:`azure_rm_aks_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 `. +* The ``digital_ocean_firewall_facts`` module was renamed to :ref:`digital_ocean_firewall_info `. +* The ``digital_ocean_floating_ip_facts`` module was renamed to :ref:`digital_ocean_floating_ip_info `. +* The ``digital_ocean_image_facts`` module was renamed to :ref:`digital_ocean_image_info `. +* The ``digital_ocean_load_balancer_facts`` module was renamed to :ref:`digital_ocean_load_balancer_info `. +* The ``digital_ocean_region_facts`` module was renamed to :ref:`digital_ocean_region_info `. +* The ``digital_ocean_size_facts`` module was renamed to :ref:`digital_ocean_size_info `. +* The ``digital_ocean_snapshot_facts`` module was renamed to :ref:`digital_ocean_snapshot_info `. +* The ``digital_ocean_tag_facts`` module was renamed to :ref:`digital_ocean_tag_info `. +* The ``digital_ocean_volume_facts`` module was renamed to :ref:`digital_ocean_volume_info `. + Plugins ======= diff --git a/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_account_facts.py b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_account_facts.py new file mode 120000 index 00000000000..6eff8165382 --- /dev/null +++ b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_account_facts.py @@ -0,0 +1 @@ +digital_ocean_account_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_certificate_facts.py b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_certificate_facts.py new file mode 120000 index 00000000000..adbb7c1ccf7 --- /dev/null +++ b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_certificate_facts.py @@ -0,0 +1 @@ +digital_ocean_certificate_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_domain_facts.py b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_domain_facts.py new file mode 120000 index 00000000000..f226660018c --- /dev/null +++ b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_domain_facts.py @@ -0,0 +1 @@ +digital_ocean_domain_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_firewall_facts.py b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_firewall_facts.py new file mode 120000 index 00000000000..847f422b670 --- /dev/null +++ b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_firewall_facts.py @@ -0,0 +1 @@ +digital_ocean_firewall_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_floating_ip_facts.py b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_floating_ip_facts.py new file mode 120000 index 00000000000..bd714566695 --- /dev/null +++ b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_floating_ip_facts.py @@ -0,0 +1 @@ +digital_ocean_floating_ip_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_image_facts.py b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_image_facts.py new file mode 120000 index 00000000000..e25fb475431 --- /dev/null +++ b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_image_facts.py @@ -0,0 +1 @@ +digital_ocean_image_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_load_balancer_facts.py b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_load_balancer_facts.py new file mode 120000 index 00000000000..2883d53ecd1 --- /dev/null +++ b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_load_balancer_facts.py @@ -0,0 +1 @@ +digital_ocean_load_balancer_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_region_facts.py b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_region_facts.py new file mode 120000 index 00000000000..c4ade0405cb --- /dev/null +++ b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_region_facts.py @@ -0,0 +1 @@ +digital_ocean_region_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_size_facts.py b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_size_facts.py new file mode 120000 index 00000000000..01aabd57505 --- /dev/null +++ b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_size_facts.py @@ -0,0 +1 @@ +digital_ocean_size_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_snapshot_facts.py b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_snapshot_facts.py new file mode 120000 index 00000000000..c902df906e9 --- /dev/null +++ b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_snapshot_facts.py @@ -0,0 +1 @@ +digital_ocean_snapshot_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_tag_facts.py b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_tag_facts.py new file mode 120000 index 00000000000..a29f869b964 --- /dev/null +++ b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_tag_facts.py @@ -0,0 +1 @@ +digital_ocean_tag_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_volume_facts.py b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_volume_facts.py new file mode 120000 index 00000000000..b6491ad79e3 --- /dev/null +++ b/lib/ansible/modules/cloud/digital_ocean/_digital_ocean_volume_facts.py @@ -0,0 +1 @@ +digital_ocean_volume_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_account_facts.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_account_info.py similarity index 70% rename from lib/ansible/modules/cloud/digital_ocean/digital_ocean_account_facts.py rename to lib/ansible/modules/cloud/digital_ocean/digital_ocean_account_info.py index 84660aeb1ca..3ef58da2042 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_account_facts.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_account_info.py @@ -17,10 +17,11 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: digital_ocean_account_facts -short_description: Gather facts about DigitalOcean User account +module: digital_ocean_account_info +short_description: Gather information about DigitalOcean User account description: - - This module can be used to gather facts about User account. + - This module can be used to gather information about User account. + - This module was called C(digital_ocean_account_facts) before Ansible 2.9. The usage did not change. author: "Abhijeet Kasurde (@Akasurde)" version_added: "2.6" @@ -32,15 +33,15 @@ extends_documentation_fragment: digital_ocean.documentation EXAMPLES = ''' -- name: Gather facts about user account - digital_ocean_account_facts: +- name: Gather information about user account + digital_ocean_account_info: oauth_token: "{{ oauth_token }}" ''' RETURN = ''' data: - description: DigitalOcean account facts + description: DigitalOcean account information returned: success type: dict sample: { @@ -65,7 +66,7 @@ def core(module): response = rest.get("account") if response.status_code != 200: - module.fail_json(msg="Failed to fetch 'account' facts due to error : %s" % response.json['message']) + module.fail_json(msg="Failed to fetch 'account' information due to error : %s" % response.json['message']) module.exit_json(changed=False, data=response.json["account"]) @@ -73,6 +74,8 @@ def core(module): def main(): argument_spec = DigitalOceanHelper.digital_ocean_argument_spec() module = AnsibleModule(argument_spec=argument_spec) + if module._name == 'digital_ocean_account_facts': + module.deprecate("The 'digital_ocean_account_facts' module has been renamed to 'digital_ocean_account_info'", version='2.13') try: core(module) except Exception as e: diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_certificate_facts.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_certificate_info.py similarity index 76% rename from lib/ansible/modules/cloud/digital_ocean/digital_ocean_certificate_facts.py rename to lib/ansible/modules/cloud/digital_ocean/digital_ocean_certificate_info.py index 5bc7e465c19..acea5a3c403 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_certificate_facts.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_certificate_info.py @@ -17,10 +17,11 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: digital_ocean_certificate_facts -short_description: Gather facts about DigitalOcean certificates +module: digital_ocean_certificate_info +short_description: Gather information about DigitalOcean certificates description: - - This module can be used to gather facts about DigitalOcean provided certificates. + - This module can be used to gather information about DigitalOcean provided certificates. + - This module was called C(digital_ocean_certificate_facts) before Ansible 2.9. The usage did not change. author: "Abhijeet Kasurde (@Akasurde)" version_added: "2.6" options: @@ -35,17 +36,17 @@ extends_documentation_fragment: digital_ocean.documentation EXAMPLES = ''' -- name: Gather facts about all certificates - digital_ocean_certificate_facts: +- name: Gather information about all certificates + digital_ocean_certificate_info: oauth_token: "{{ oauth_token }}" -- name: Gather facts about certificate with given id - digital_ocean_certificate_facts: +- name: Gather information about certificate with given id + digital_ocean_certificate_info: oauth_token: "{{ oauth_token }}" certificate_id: "892071a0-bb95-49bc-8021-3afd67a210bf" -- name: Get not after facts about certificate - digital_ocean_certificate_facts: +- name: Get not after information about certificate + digital_ocean_certificate_info: register: resp_out - set_fact: not_after_date: "{{ item.not_after }}" @@ -58,7 +59,7 @@ EXAMPLES = ''' RETURN = ''' data: - description: DigitalOcean certificate facts + description: DigitalOcean certificate information returned: success type: list sample: [ @@ -104,6 +105,8 @@ def main(): certificate_id=dict(type='str', required=False), ) module = AnsibleModule(argument_spec=argument_spec) + if module._name == 'digital_ocean_certificate_facts': + module.deprecate("The 'digital_ocean_certificate_facts' module has been renamed to 'digital_ocean_certificate_info'", version='2.13') try: core(module) diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_domain_facts.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_domain_info.py similarity index 81% rename from lib/ansible/modules/cloud/digital_ocean/digital_ocean_domain_facts.py rename to lib/ansible/modules/cloud/digital_ocean/digital_ocean_domain_info.py index d30b7e66958..10a8dd77cdc 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_domain_facts.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_domain_info.py @@ -17,16 +17,17 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: digital_ocean_domain_facts -short_description: Gather facts about DigitalOcean Domains +module: digital_ocean_domain_info +short_description: Gather information about DigitalOcean Domains description: - - This module can be used to gather facts about DigitalOcean provided Domains. + - This module can be used to gather information about DigitalOcean provided Domains. + - This module was called C(digital_ocean_domain_facts) before Ansible 2.9. The usage did not change. author: "Abhijeet Kasurde (@Akasurde)" version_added: "2.6" options: domain_name: description: - - Name of the domain to gather facts for. + - Name of the domain to gather information for. required: false requirements: - "python >= 2.6" @@ -35,17 +36,17 @@ extends_documentation_fragment: digital_ocean.documentation EXAMPLES = ''' -- name: Gather facts about all domains - digital_ocean_domain_facts: +- name: Gather information about all domains + digital_ocean_domain_info: oauth_token: "{{ oauth_token }}" -- name: Gather facts about domain with given name - digital_ocean_domain_facts: +- name: Gather information about domain with given name + digital_ocean_domain_info: oauth_token: "{{ oauth_token }}" domain_name: "example.com" - name: Get ttl from domain - digital_ocean_domain_facts: + digital_ocean_domain_info: register: resp_out - set_fact: domain_ttl: "{{ item.ttl }}" @@ -58,7 +59,7 @@ EXAMPLES = ''' RETURN = ''' data: - description: DigitalOcean Domain facts + description: DigitalOcean Domain information returned: success type: list sample: [ @@ -129,6 +130,8 @@ def main(): domain_name=dict(type='str', required=False), ) module = AnsibleModule(argument_spec=argument_spec) + if module._name == 'digital_ocean_domain_facts': + module.deprecate("The 'digital_ocean_domain_facts' module has been renamed to 'digital_ocean_domain_info'", version='2.13') try: core(module) diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_firewall_facts.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_firewall_info.py similarity index 80% rename from lib/ansible/modules/cloud/digital_ocean/digital_ocean_firewall_facts.py rename to lib/ansible/modules/cloud/digital_ocean/digital_ocean_firewall_info.py index 88fbb1ab9b6..7d4334e85a7 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_firewall_facts.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_firewall_info.py @@ -17,10 +17,11 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: digital_ocean_firewall_facts -short_description: Gather facts about DigitalOcean firewalls +module: digital_ocean_firewall_info +short_description: Gather information about DigitalOcean firewalls description: - - This module can be used to gather facts about DigitalOcean firewalls. + - This module can be used to gather information about DigitalOcean firewalls. + - This module was called C(digital_ocean_firewall_facts) before Ansible 2.9. The usage did not change. author: "Anthony Bond (@BondAnthony)" version_added: "2.8" options: @@ -35,17 +36,17 @@ extends_documentation_fragment: digital_ocean.documentation EXAMPLES = ''' -- name: Gather facts about all firewalls - digital_ocean_firewall_facts: +- name: Gather information about all firewalls + digital_ocean_firewall_info: oauth_token: "{{ oauth_token }}" -- name: Gather facts about a specific firewall by name - digital_ocean_firewall_facts: +- name: Gather information about a specific firewall by name + digital_ocean_firewall_info: oauth_token: "{{ oauth_token }}" name: "firewall_name" - name: Gather information from a firewall rule - digital_ocean_firewall_facts: + digital_ocean_firewall_info: name: SSH register: resp_out @@ -59,7 +60,7 @@ EXAMPLES = ''' RETURN = ''' data: - description: DigitalOcean firewall facts + description: DigitalOcean firewall information returned: success type: list sample: [ @@ -122,6 +123,8 @@ def main(): name=dict(type='str', required=False), ) module = AnsibleModule(argument_spec=argument_spec) + if module._name == 'digital_ocean_firewall_facts': + module.deprecate("The 'digital_ocean_firewall_facts' module has been renamed to 'digital_ocean_firewall_info'", version='2.13') try: core(module) diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_floating_ip_facts.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_floating_ip_info.py similarity index 82% rename from lib/ansible/modules/cloud/digital_ocean/digital_ocean_floating_ip_facts.py rename to lib/ansible/modules/cloud/digital_ocean/digital_ocean_floating_ip_info.py index 3b70ceea440..2d335fa6099 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_floating_ip_facts.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_floating_ip_info.py @@ -15,10 +15,11 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: digital_ocean_floating_ip_facts -short_description: DigitalOcean Floating IPs facts +module: digital_ocean_floating_ip_info +short_description: DigitalOcean Floating IPs information description: - - This module can be used to fetch DigitalOcean Floating IPs facts. + - This module can be used to fetch DigitalOcean Floating IPs information. + - This module was called C(digital_ocean_floating_ip_facts) before Ansible 2.9. The usage did not change. version_added: "2.5" author: "Patrick Marques (@pmarques)" extends_documentation_fragment: digital_ocean.documentation @@ -30,8 +31,8 @@ requirements: EXAMPLES = ''' -- name: "Gather facts about all Floating IPs" - digital_ocean_floating_ip_facts: +- name: "Gather information about all Floating IPs" + digital_ocean_floating_ip_info: register: result - name: "List of current floating ips" @@ -101,7 +102,7 @@ def core(module): if status_code == 200: module.exit_json(changed=False, floating_ips=floating_ips) else: - module.fail_json(msg="Error fetching facts [{0}: {1}]".format( + module.fail_json(msg="Error fetching information [{0}: {1}]".format( status_code, response.json["message"])) @@ -109,6 +110,8 @@ def main(): module = AnsibleModule( argument_spec=DigitalOceanHelper.digital_ocean_argument_spec() ) + if module._name == 'digital_ocean_floating_ip_facts': + module.deprecate("The 'digital_ocean_floating_ip_facts' module has been renamed to 'digital_ocean_floating_ip_info'", version='2.13') try: core(module) diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_image_facts.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_image_info.py similarity index 73% rename from lib/ansible/modules/cloud/digital_ocean/digital_ocean_image_facts.py rename to lib/ansible/modules/cloud/digital_ocean/digital_ocean_image_info.py index cec527d3e7a..4f3ecc0e88c 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_image_facts.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_image_info.py @@ -17,21 +17,22 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: digital_ocean_image_facts -short_description: Gather facts about DigitalOcean images +module: digital_ocean_image_info +short_description: Gather information about DigitalOcean images description: - - This module can be used to gather facts about DigitalOcean provided images. + - This module can be used to gather information about DigitalOcean provided images. - These images can be either of type C(distribution), C(application) and C(private). + - This module was called C(digital_ocean_image_facts) before Ansible 2.9. The usage did not change. author: "Abhijeet Kasurde (@Akasurde)" version_added: "2.6" options: image_type: description: - - Specifies the type of image facts to be retrived. - - If set to C(application), then facts are gathered related to all application images. - - If set to C(distribution), then facts are gathered related to all distribution images. - - If set to C(private), then facts are gathered related to all private images. - - If not set to any of above, then facts are gathered related to all images. + - Specifies the type of image information to be retrived. + - If set to C(application), then information are gathered related to all application images. + - If set to C(distribution), then information are gathered related to all distribution images. + - If set to C(private), then information are gathered related to all private images. + - If not set to any of above, then information are gathered related to all images. default: 'all' choices: [ 'all', 'application', 'distribution', 'private' ] required: false @@ -42,23 +43,23 @@ extends_documentation_fragment: digital_ocean.documentation EXAMPLES = ''' -- name: Gather facts about all images - digital_ocean_image_facts: +- name: Gather information about all images + digital_ocean_image_info: image_type: all oauth_token: "{{ oauth_token }}" -- name: Gather facts about application images - digital_ocean_image_facts: +- name: Gather information about application images + digital_ocean_image_info: image_type: application oauth_token: "{{ oauth_token }}" -- name: Gather facts about distribution images - digital_ocean_image_facts: +- name: Gather information about distribution images + digital_ocean_image_info: image_type: distribution oauth_token: "{{ oauth_token }}" - name: Get distribution about image with slug coreos-beta - digital_ocean_image_facts: + digital_ocean_image_info: register: resp_out - set_fact: distribution_name: "{{ item.distribution }}" @@ -72,7 +73,7 @@ EXAMPLES = ''' RETURN = ''' data: - description: DigitalOcean image facts + description: DigitalOcean image information returned: success type: list sample: [ @@ -139,6 +140,8 @@ def main(): ) module = AnsibleModule(argument_spec=argument_spec) + if module._name == 'digital_ocean_image_facts': + module.deprecate("The 'digital_ocean_image_facts' module has been renamed to 'digital_ocean_image_info'", version='2.13') try: core(module) diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_load_balancer_facts.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_load_balancer_info.py similarity index 77% rename from lib/ansible/modules/cloud/digital_ocean/digital_ocean_load_balancer_facts.py rename to lib/ansible/modules/cloud/digital_ocean/digital_ocean_load_balancer_info.py index fcc8bc7c4c0..c3141997ea1 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_load_balancer_facts.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_load_balancer_info.py @@ -17,10 +17,11 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: digital_ocean_load_balancer_facts -short_description: Gather facts about DigitalOcean load balancers +module: digital_ocean_load_balancer_info +short_description: Gather information about DigitalOcean load balancers description: - - This module can be used to gather facts about DigitalOcean provided load balancers. + - This module can be used to gather information about DigitalOcean provided load balancers. + - This module was called C(digital_ocean_load_balancer_facts) before Ansible 2.9. The usage did not change. author: "Abhijeet Kasurde (@Akasurde)" version_added: "2.6" options: @@ -35,17 +36,17 @@ extends_documentation_fragment: digital_ocean.documentation EXAMPLES = ''' -- name: Gather facts about all load balancers - digital_ocean_load_balancer_facts: +- name: Gather information about all load balancers + digital_ocean_load_balancer_info: oauth_token: "{{ oauth_token }}" -- name: Gather facts about load balancer with given id - digital_ocean_load_balancer_facts: +- name: Gather information about load balancer with given id + digital_ocean_load_balancer_info: oauth_token: "{{ oauth_token }}" load_balancer_id: "4de7ac8b-495b-4884-9a69-1050c6793cd6" - name: Get name from load balancer id - digital_ocean_load_balancer_facts: + digital_ocean_load_balancer_info: register: resp_out - set_fact: load_balancer_name: "{{ item.name }}" @@ -58,7 +59,7 @@ EXAMPLES = ''' RETURN = ''' data: - description: DigitalOcean Load balancer facts + description: DigitalOcean Load balancer information returned: success type: list sample: [ @@ -106,6 +107,8 @@ def main(): load_balancer_id=dict(type='str', required=False), ) module = AnsibleModule(argument_spec=argument_spec) + if module._name == 'digital_ocean_load_balancer_facts': + module.deprecate("The 'digital_ocean_load_balancer_facts' module has been renamed to 'digital_ocean_load_balancer_info'", version='2.13') try: core(module) diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_region_facts.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_region_info.py similarity index 80% rename from lib/ansible/modules/cloud/digital_ocean/digital_ocean_region_facts.py rename to lib/ansible/modules/cloud/digital_ocean/digital_ocean_region_info.py index 19a96247752..34edf396ffa 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_region_facts.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_region_info.py @@ -17,10 +17,11 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: digital_ocean_region_facts -short_description: Gather facts about DigitalOcean regions +module: digital_ocean_region_info +short_description: Gather information about DigitalOcean regions description: - - This module can be used to gather facts about regions. + - This module can be used to gather information about regions. + - This module was called C(digital_ocean_region_facts) before Ansible 2.9. The usage did not change. author: "Abhijeet Kasurde (@Akasurde)" version_added: "2.6" extends_documentation_fragment: digital_ocean.documentation @@ -30,12 +31,12 @@ requirements: EXAMPLES = ''' -- name: Gather facts about all regions - digital_ocean_region_facts: +- name: Gather information about all regions + digital_ocean_region_info: oauth_token: "{{ oauth_token }}" - name: Get Name of region where slug is known - digital_ocean_region_facts: + digital_ocean_region_info: oauth_token: "{{ oauth_token }}" register: resp_out - debug: var=resp_out @@ -50,7 +51,7 @@ EXAMPLES = ''' RETURN = ''' data: - description: DigitalOcean regions facts + description: DigitalOcean regions information returned: success type: list sample: [ @@ -106,6 +107,8 @@ def core(module): def main(): argument_spec = DigitalOceanHelper.digital_ocean_argument_spec() module = AnsibleModule(argument_spec=argument_spec) + if module._name == 'digital_ocean_region_facts': + module.deprecate("The 'digital_ocean_region_facts' module has been renamed to 'digital_ocean_region_info'", version='2.13') try: core(module) diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_size_facts.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_size_info.py similarity index 76% rename from lib/ansible/modules/cloud/digital_ocean/digital_ocean_size_facts.py rename to lib/ansible/modules/cloud/digital_ocean/digital_ocean_size_info.py index 479bd046988..ca9f35c7bd8 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_size_facts.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_size_info.py @@ -17,10 +17,11 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: digital_ocean_size_facts -short_description: Gather facts about DigitalOcean Droplet sizes +module: digital_ocean_size_info +short_description: Gather information about DigitalOcean Droplet sizes description: - - This module can be used to gather facts about droplet sizes. + - This module can be used to gather information about droplet sizes. + - This module was called C(digital_ocean_size_facts) before Ansible 2.9. The usage did not change. author: "Abhijeet Kasurde (@Akasurde)" version_added: "2.6" requirements: @@ -30,12 +31,12 @@ extends_documentation_fragment: digital_ocean.documentation EXAMPLES = ''' -- name: Gather facts about all droplet sizes - digital_ocean_size_facts: +- name: Gather information about all droplet sizes + digital_ocean_size_info: oauth_token: "{{ oauth_token }}" - name: Get droplet Size Slug where vcpus is 1 - digital_ocean_size_facts: + digital_ocean_size_info: oauth_token: "{{ oauth_token }}" register: resp_out - debug: var=resp_out @@ -52,7 +53,7 @@ EXAMPLES = ''' RETURN = ''' data: - description: DigitalOcean droplet size facts + description: DigitalOcean droplet size information returned: success type: list sample: [ @@ -94,7 +95,7 @@ def core(module): response = rest.get('sizes') if response.status_code != 200: - module.fail_json(msg="Failed to fetch 'sizes' facts due to error : %s" % response.json['message']) + module.fail_json(msg="Failed to fetch 'sizes' information due to error : %s" % response.json['message']) module.exit_json(changed=False, data=response.json['sizes']) @@ -104,6 +105,8 @@ def main(): module = AnsibleModule( argument_spec=argument_spec, ) + if module._name == 'digital_ocean_size_facts': + module.deprecate("The 'digital_ocean_size_facts' module has been renamed to 'digital_ocean_size_info'", version='2.13') try: core(module) diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_snapshot_facts.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_snapshot_info.py similarity index 67% rename from lib/ansible/modules/cloud/digital_ocean/digital_ocean_snapshot_facts.py rename to lib/ansible/modules/cloud/digital_ocean/digital_ocean_snapshot_info.py index f3a45be9362..09e1eeba8f0 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_snapshot_facts.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_snapshot_info.py @@ -17,27 +17,28 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: digital_ocean_snapshot_facts -short_description: Gather facts about DigitalOcean Snapshot +module: digital_ocean_snapshot_info +short_description: Gather information about DigitalOcean Snapshot description: - - This module can be used to gather facts about snapshot facts based upon provided values such as droplet, volume and snapshot id. + - This module can be used to gather information about snapshot information based upon provided values such as droplet, volume and snapshot id. + - This module was called C(digital_ocean_snapshot_facts) before Ansible 2.9. The usage did not change. author: "Abhijeet Kasurde (@Akasurde)" version_added: "2.6" options: snapshot_type: description: - - Specifies the type of snapshot facts to be retrived. - - If set to C(droplet), then facts are gathered related to snapshots based on Droplets only. - - If set to C(volume), then facts are gathered related to snapshots based on volumes only. - - If set to C(by_id), then facts are gathered related to snapshots based on snapshot id only. - - If not set to any of the above, then facts are gathered related to all snapshots. + - Specifies the type of snapshot information to be retrived. + - If set to C(droplet), then information are gathered related to snapshots based on Droplets only. + - If set to C(volume), then information are gathered related to snapshots based on volumes only. + - If set to C(by_id), then information are gathered related to snapshots based on snapshot id only. + - If not set to any of the above, then information are gathered related to all snapshots. default: 'all' choices: [ 'all', 'droplet', 'volume', 'by_id'] required: false snapshot_id: description: - To retrieve information about a snapshot, please specify this as a snapshot id. - - If set to actual snapshot id, then facts are gathered related to that particular snapshot only. + - If set to actual snapshot id, then information are gathered related to that particular snapshot only. - This is required parameter, if C(snapshot_type) is set to C(by_id). required: false requirements: @@ -47,29 +48,29 @@ extends_documentation_fragment: digital_ocean.documentation EXAMPLES = ''' -- name: Gather facts about all snapshots - digital_ocean_snapshot_facts: +- name: Gather information about all snapshots + digital_ocean_snapshot_info: snapshot_type: all oauth_token: "{{ oauth_token }}" -- name: Gather facts about droplet snapshots - digital_ocean_snapshot_facts: +- name: Gather information about droplet snapshots + digital_ocean_snapshot_info: snapshot_type: droplet oauth_token: "{{ oauth_token }}" -- name: Gather facts about volume snapshots - digital_ocean_snapshot_facts: +- name: Gather information about volume snapshots + digital_ocean_snapshot_info: snapshot_type: volume oauth_token: "{{ oauth_token }}" -- name: Gather facts about snapshot by snapshot id - digital_ocean_snapshot_facts: +- name: Gather information about snapshot by snapshot id + digital_ocean_snapshot_info: snapshot_type: by_id snapshot_id: 123123123 oauth_token: "{{ oauth_token }}" -- name: Get facts about snapshot named big-data-snapshot1 - digital_ocean_snapshot_facts: +- name: Get information about snapshot named big-data-snapshot1 + digital_ocean_snapshot_info: register: resp_out - set_fact: snapshot_id: "{{ item.id }}" @@ -83,7 +84,7 @@ EXAMPLES = ''' RETURN = ''' data: - description: DigitalOcean snapshot facts + description: DigitalOcean snapshot information returned: success type: list sample: [ @@ -122,7 +123,7 @@ def core(module): status_code = response.status_code if status_code != 200: - module.fail_json(msg="Failed to fetch snapshot facts due to error : %s" % response.json['message']) + module.fail_json(msg="Failed to fetch snapshot information due to error : %s" % response.json['message']) snapshot.extend(response.json["snapshot"]) else: @@ -151,6 +152,8 @@ def main(): ['snapshot_type', 'by_id', ['snapshot_id']], ], ) + if module._name == 'digital_ocean_snapshot_facts': + module.deprecate("The 'digital_ocean_snapshot_facts' module has been renamed to 'digital_ocean_snapshot_info'", version='2.13') try: core(module) diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag_facts.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag_info.py similarity index 79% rename from lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag_facts.py rename to lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag_info.py index e5f4e9c41cc..267f75be3d7 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag_facts.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag_info.py @@ -17,10 +17,11 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: digital_ocean_tag_facts -short_description: Gather facts about DigitalOcean tags +module: digital_ocean_tag_info +short_description: Gather information about DigitalOcean tags description: - - This module can be used to gather facts about DigitalOcean provided tags. + - This module can be used to gather information about DigitalOcean provided tags. + - This module was called C(digital_ocean_tag_facts) before Ansible 2.9. The usage did not change. author: "Abhijeet Kasurde (@Akasurde)" version_added: "2.6" options: @@ -35,17 +36,17 @@ extends_documentation_fragment: digital_ocean.documentation EXAMPLES = ''' -- name: Gather facts about all tags - digital_ocean_tag_facts: +- name: Gather information about all tags + digital_ocean_tag_info: oauth_token: "{{ oauth_token }}" -- name: Gather facts about tag with given name - digital_ocean_tag_facts: +- name: Gather information about tag with given name + digital_ocean_tag_info: oauth_token: "{{ oauth_token }}" tag_name: "extra_awesome_tag" - name: Get resources from tag name - digital_ocean_tag_facts: + digital_ocean_tag_info: register: resp_out - set_fact: resources: "{{ item.resources }}" @@ -58,7 +59,7 @@ EXAMPLES = ''' RETURN = ''' data: - description: DigitalOcean tag facts + description: DigitalOcean tag information returned: success type: list sample: [ @@ -106,6 +107,8 @@ def main(): tag_name=dict(type='str', required=False), ) module = AnsibleModule(argument_spec=argument_spec) + if module._name == 'digital_ocean_tag_facts': + module.deprecate("The 'digital_ocean_tag_facts' module has been renamed to 'digital_ocean_tag_info'", version='2.13') try: core(module) diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_volume_facts.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_volume_info.py similarity index 78% rename from lib/ansible/modules/cloud/digital_ocean/digital_ocean_volume_facts.py rename to lib/ansible/modules/cloud/digital_ocean/digital_ocean_volume_info.py index e772ce19841..0381aaf0a1d 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_volume_facts.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_volume_info.py @@ -17,17 +17,18 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: digital_ocean_volume_facts -short_description: Gather facts about DigitalOcean volumes +module: digital_ocean_volume_info +short_description: Gather information about DigitalOcean volumes description: - - This module can be used to gather facts about DigitalOcean provided volumes. + - This module can be used to gather information about DigitalOcean provided volumes. + - This module was called C(digital_ocean_volume_facts) before Ansible 2.9. The usage did not change. author: "Abhijeet Kasurde (@Akasurde)" version_added: "2.6" options: region_name: description: - Name of region to restrict results to volumes available in a specific region. - - Please use M(digital_ocean_region_facts) for getting valid values related regions. + - Please use M(digital_ocean_region_info) for getting valid values related regions. required: false requirements: @@ -38,17 +39,17 @@ extends_documentation_fragment: digital_ocean.documentation EXAMPLES = ''' -- name: Gather facts about all volume - digital_ocean_volume_facts: +- name: Gather information about all volume + digital_ocean_volume_info: oauth_token: "{{ oauth_token }}" -- name: Gather facts about volume in given region - digital_ocean_volume_facts: +- name: Gather information about volume in given region + digital_ocean_volume_info: region_name: nyc1 oauth_token: "{{ oauth_token }}" -- name: Get facts about volume named nyc3-test-volume - digital_ocean_volume_facts: +- name: Get information about volume named nyc3-test-volume + digital_ocean_volume_info: register: resp_out - set_fact: volume_id: "{{ item.id }}" @@ -61,7 +62,7 @@ EXAMPLES = ''' RETURN = ''' data: - description: DigitalOcean volume facts + description: DigitalOcean volume information returned: success type: list sample: [ @@ -131,6 +132,8 @@ def main(): region_name=dict(type='str', required=False), ) module = AnsibleModule(argument_spec=argument_spec) + if module._name == 'digital_ocean_volume_facts': + module.deprecate("The 'digital_ocean_volume_facts' module has been renamed to 'digital_ocean_volume_info'", version='2.13') try: core(module)