From 10c06d4e1ec8e3f2da15dab7528cf17fd92f7174 Mon Sep 17 00:00:00 2001 From: willthames Date: Tue, 17 Dec 2013 15:00:42 +1000 Subject: [PATCH] Make state=present the default for ec2_tag Using `ec2_tag` module without the state argument currently results in: ``` failed: [127.0.0.1] => {"failed": true, "parsed": false} ``` This fix makes `state=present` the default --- cloud/ec2_tag | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cloud/ec2_tag b/cloud/ec2_tag index 71e6792698d..53d7af18ccc 100644 --- a/cloud/ec2_tag +++ b/cloud/ec2_tag @@ -31,8 +31,9 @@ options: state: description: - Whether the tags should be present or absent on the resource. - required: true - default: null + required: false + default: present + choices: ['present', 'absent'] aliases: [] region: description: @@ -116,7 +117,7 @@ def main(): resource = dict(required=True), tags = dict(required=True), region = dict(aliases=['aws_region', 'ec2_region'], choices=AWS_REGIONS), - state = dict(choices=['present', 'absent']), + state = dict(default='present', choices=['present', 'absent']), ec2_url = dict(aliases=['EC2_URL']), ec2_secret_key = dict(aliases=['aws_secret_key', 'secret_key'], no_log=True), ec2_access_key = dict(aliases=['aws_access_key', 'access_key']),