summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorABond <ajbond2005@gmail.com>2017-12-02 14:51:19 -0500
committerToshio Kuratomi <a.badger@gmail.com>2018-01-18 20:08:42 -0800
commit3e03ae8d5caaa859e857453c45d75145fbb9e2ae (patch)
tree4931fb1b82d3924539195d24fcc963ff1e762669
parentcef6a7ec7dc3dc226944c5792a87df5b8b465b79 (diff)
downloadansible-3e03ae8d5caaa859e857453c45d75145fbb9e2ae.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> (cherry picked from commit f9b138b0ab9a8af05bf99a4dced111c810241236)
-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),