From f9b138b0ab9a8af05bf99a4dced111c810241236 Mon Sep 17 00:00:00 2001 From: ABond Date: Sat, 2 Dec 2017 14:51:19 -0500 Subject: [PATCH] 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 Signed-off-by: Abhijeet Kasurde --- .../modules/cloud/digital_ocean/digital_ocean_tag.py | 7 ++++--- 1 file 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),