summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/cloud/digital_ocean
diff options
context:
space:
mode:
authorABond <ajbond2005@gmail.com>2017-12-02 14:51:19 -0500
committerAbhijeet Kasurde <akasurde@redhat.com>2017-12-03 01:21:19 +0530
commitf9b138b0ab9a8af05bf99a4dced111c810241236 (patch)
tree38e47fd48eaf21ee37e1154101df830bd58476f1 /lib/ansible/modules/cloud/digital_ocean
parent24f8a35258ce8e2716c8d27fb00c939005cf6d4e (diff)
downloadansible-f9b138b0ab9a8af05bf99a4dced111c810241236.tar.gz
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>
Diffstat (limited to 'lib/ansible/modules/cloud/digital_ocean')
-rw-r--r--lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag.py
index aed042a203..5d314f35c4 100644
--- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag.py
+++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag.py
@@ -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),