Renames Digital Ocean cloud _facts modules to _info (#57315)

Fixes: #57276
This commit is contained in:
pratikgadiya12 2019-06-06 23:03:19 +05:30 committed by Felix Fontein
parent bd48a7fb73
commit 72297db686
26 changed files with 197 additions and 123 deletions

View file

@ -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``.

View file

@ -79,6 +79,19 @@ Noteworthy module changes
* The ``memset_server_facts`` module was renamed to :ref:`memset_server_info <memset_server_info_module>`.
* The ``one_image_facts`` module was renamed to :ref:`one_image_info <one_image_info_module>`.
* The ``azure_rm_resourcegroup_facts`` module was renamed to :ref:`azure_rm_aks_info <azure_rm_resourcegroup_info_module>`.
* The ``digital_ocean_account_facts`` module was renamed to :ref:`digital_ocean_account_info <digital_ocean_account_info_module>`.
* The ``digital_ocean_certificate_facts`` module was renamed to :ref:`digital_ocean_certificate_info <digital_ocean_certificate_info_module>`.
* The ``digital_ocean_domain_facts`` module was renamed to :ref:`digital_ocean_domain_info <digital_ocean_domain_info_module>`.
* The ``digital_ocean_firewall_facts`` module was renamed to :ref:`digital_ocean_firewall_info <digital_ocean_firewall_info_module>`.
* The ``digital_ocean_floating_ip_facts`` module was renamed to :ref:`digital_ocean_floating_ip_info <digital_ocean_floating_ip_info_module>`.
* The ``digital_ocean_image_facts`` module was renamed to :ref:`digital_ocean_image_info <digital_ocean_image_info_module>`.
* The ``digital_ocean_load_balancer_facts`` module was renamed to :ref:`digital_ocean_load_balancer_info <digital_ocean_load_balancer_info_module>`.
* The ``digital_ocean_region_facts`` module was renamed to :ref:`digital_ocean_region_info <digital_ocean_region_info_module>`.
* The ``digital_ocean_size_facts`` module was renamed to :ref:`digital_ocean_size_info <digital_ocean_size_info_module>`.
* The ``digital_ocean_snapshot_facts`` module was renamed to :ref:`digital_ocean_snapshot_info <digital_ocean_snapshot_info_module>`.
* The ``digital_ocean_tag_facts`` module was renamed to :ref:`digital_ocean_tag_info <digital_ocean_tag_info_module>`.
* The ``digital_ocean_volume_facts`` module was renamed to :ref:`digital_ocean_volume_info <digital_ocean_volume_info_module>`.
Plugins
=======

View file

@ -0,0 +1 @@
digital_ocean_account_info.py

View file

@ -0,0 +1 @@
digital_ocean_certificate_info.py

View file

@ -0,0 +1 @@
digital_ocean_domain_info.py

View file

@ -0,0 +1 @@
digital_ocean_firewall_info.py

View file

@ -0,0 +1 @@
digital_ocean_floating_ip_info.py

View file

@ -0,0 +1 @@
digital_ocean_image_info.py

View file

@ -0,0 +1 @@
digital_ocean_load_balancer_info.py

View file

@ -0,0 +1 @@
digital_ocean_region_info.py

View file

@ -0,0 +1 @@
digital_ocean_size_info.py

View file

@ -0,0 +1 @@
digital_ocean_snapshot_info.py

View file

@ -0,0 +1 @@
digital_ocean_tag_info.py

View file

@ -0,0 +1 @@
digital_ocean_volume_info.py

View file

@ -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:

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)