mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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>
This commit is contained in:
parent
24f8a35258
commit
f9b138b0ab
1 changed files with 4 additions and 3 deletions
|
@ -30,6 +30,7 @@ options:
|
||||||
resource_id:
|
resource_id:
|
||||||
description:
|
description:
|
||||||
- The ID of the resource to operate on.
|
- 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:
|
resource_type:
|
||||||
description:
|
description:
|
||||||
- The type of resource to operate on. Currently, only tagging of
|
- 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
|
- name: tag a resource; creating the tag if it does not exists
|
||||||
digital_ocean_tag:
|
digital_ocean_tag:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
resource_id: YYY
|
resource_id: "73333005"
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- staging
|
- staging
|
||||||
|
@ -73,7 +74,7 @@ EXAMPLES = '''
|
||||||
- name: untag a resource
|
- name: untag a resource
|
||||||
digital_ocean_tag:
|
digital_ocean_tag:
|
||||||
name: staging
|
name: staging
|
||||||
resource_id: YYY
|
resource_id: "73333005"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
# Deleting a tag also untags all the resources that have previously been
|
# Deleting a tag also untags all the resources that have previously been
|
||||||
|
@ -198,7 +199,7 @@ def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
name=dict(type='str', required=True),
|
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'),
|
resource_type=dict(choices=['droplet'], default='droplet'),
|
||||||
state=dict(choices=['present', 'absent'], default='present'),
|
state=dict(choices=['present', 'absent'], default='present'),
|
||||||
api_token=dict(aliases=['API_TOKEN'], no_log=True),
|
api_token=dict(aliases=['API_TOKEN'], no_log=True),
|
||||||
|
|
Loading…
Reference in a new issue