should ec2_group module have the description as required?

Hello everyone,

I’m just trying to do some cleaning up as part of my playbooks and one task should go around and remove dummy security group(s).
Because of this case, I don’t see the utility of the ‘description’ parameter as being mandatory.

One step further, I’d rather see the module support something like an optional ‘id’ parameter, which, when passed, would render the ‘name’ not mandatory. This would be really useful for using with the state=absent scenario. Not sure how Ansible handles parameters inter-dependency/over-riding/amending but I think there are some modules that come with comparable logic.

For example, the debug says something like:

`

TASK: [debug var=web_sg_creation] *********************************************
ok: [localhost] => {
“web_sg_creation”: {
“changed”: false,
“group_id”: “sg-dcfd15b5”,
“invocation”: {
“module_args”: “”,
“module_name”: “ec2_group”
}
}
}

`

So how am I to go around doing the state=absent in the best Ansible-way?

Would be interesting to see some other opinions / suggestions.

<nod>, that would make sense to me. Current behaviour is likely from
the module growing additional features over time and the combination
of options no longer making sense. So the module probably needs to
check if we're trying to create a security group and only if that's
true make lack of a description an error.

Care to submit a pull request for this?

-Toshio

I’ll fiddle around with it this weekend and update the thread when done.

Thanks!

Hi Dan,

Did you make any progress on this feature?