# using rule\_desc with ec2\_group will always clear the rules on the first run

**URL:** <https://forum.ansible.com/t/using-rule-desc-with-ec2-group-will-always-clear-the-rules-on-the-first-run/28744>\
**Category:** Ansible Project\
**Created:** [October 8, 2018, 10:11pm UTC](https://forum.ansible.com/t/using-rule-desc-with-ec2-group-will-always-clear-the-rules-on-the-first-run/28744 "2018-10-08T22:11:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barry\_Kaplan](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Barry\_Kaplan](https://forum.ansible.com/u/Barry_Kaplan)\
**Post date:** [October 8, 2018, 10:11pm UTC](https://forum.ansible.com/t/using-rule-desc-with-ec2-group-will-always-clear-the-rules-on-the-first-run/28744/1 "2018-10-08T22:11:25Z")

</div>

I just recently discovered `rule_desc`. So upon adding the description to some plays I am seeing the behavior that the first time `ec2_group` is executed with the rule description, all rules (or at least the rules with the descriptions) are removed. Only on the second run of `ec2_groups` are the rules with the descriptions created. Subsequent runs are then unchanged.

I still have some other experiments to run to see the scope of this. Like what happens if the description is changed for a rule that already has a description.

In the meantime, has anybody else seen this.

ansible versions: 2.6.4, 2.6.5

---

<div class="post-metadata">

**Author:** ![Barry\_Kaplan](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Barry\_Kaplan](https://forum.ansible.com/u/Barry_Kaplan)\
**Post date:** [October 9, 2018, 2:00am UTC](https://forum.ansible.com/t/using-rule-desc-with-ec2-group-will-always-clear-the-rules-on-the-first-run/28744/2 "2018-10-09T02:00:51Z")

</div>

I find that when I change a rule\_desc I get an error

> An error occurred (InvalidPermission.NotFound) when calling the RevokeSecurityGroupIngress operation: The specified rule does not exist in this security group."

Immediately rerunning the play and ec2\_group shows no change. So the previous execution actually changed the rule description before crashing.
