Fix Digital Ocean tags module data type (#33486)

Digital Ocean changed their api to no longer accept an integer as a resource_id.  Fix adds changed data type (from integer to string).

Signed-off-by: Anthony Bond <bond.anthony@outlook.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/33489/head
ABond 7 years ago committed by Abhijeet Kasurde
parent 24f8a35258
commit f9b138b0ab

@ -30,6 +30,7 @@ options:
resource_id:
description:
- The ID of the resource to operate on.
- The data type of resource_id is changed from integer to string, from version 2.5.
resource_type:
description:
- The type of resource to operate on. Currently, only tagging of
@ -64,7 +65,7 @@ EXAMPLES = '''
- name: tag a resource; creating the tag if it does not exists
digital_ocean_tag:
name: "{{ item }}"
resource_id: YYY
resource_id: "73333005"
state: present
with_items:
- staging
@ -73,7 +74,7 @@ EXAMPLES = '''
- name: untag a resource
digital_ocean_tag:
name: staging
resource_id: YYY
resource_id: "73333005"
state: absent
# Deleting a tag also untags all the resources that have previously been
@ -198,7 +199,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
name=dict(type='str', required=True),
resource_id=dict(aliases=['droplet_id'], type='int'),
resource_id=dict(aliases=['droplet_id'], type='str'),
resource_type=dict(choices=['droplet'], default='droplet'),
state=dict(choices=['present', 'absent'], default='present'),
api_token=dict(aliases=['API_TOKEN'], no_log=True),

Loading…
Cancel
Save