short_description: create and remove tag(s) to ec2 resources.
short_description: create and remove tag(s) to ec2 resources.
description:
description:
- Creates and removes tags from any EC2 resource. The resource is referenced by its resource id (e.g. an instance being i-XXXXXXX). It is designed to be used with complex args (tags), see the examples. This module has a dependency on python-boto.
- Creates, removes and lists tags from any EC2 resource. The resource is referenced by its resource id (e.g. an instance being i-XXXXXXX). It is designed to be used with complex args (tags), see the examples. This module has a dependency on python-boto.
version_added: "1.3"
version_added: "1.3"
options:
options:
resource:
resource:
@ -30,7 +30,7 @@ options:
aliases: []
aliases: []
state:
state:
description:
description:
- Whether the tags should be present or absent on the resource.
- Whether the tags should be present or absent on the resource. Use list to interrogate the tags of an instance.
required: false
required: false
default: present
default: present
choices: ['present', 'absent']
choices: ['present', 'absent']
@ -115,14 +115,14 @@ def main():
argument_spec = ec2_argument_spec()
argument_spec = ec2_argument_spec()
argument_spec.update(dict(
argument_spec.update(dict(
resource = dict(required=True),
resource = dict(required=True),
tags = dict(required=True),
tags = dict(),
state = dict(default='present', choices=['present', 'absent']),
state = dict(default='present', choices=['present', 'absent', 'list']),