Hi,
I have tried your suggestion of having an empty egress_rules list. However
for some reason an all access egress rules are always enabled in all the
security groups.
On Friday, 15 May 2015 10:32:37 UTC-7, Rahul Mehrotra wrote:
>
>
> I have an Ansible script to create EC2 security group. It looks like this
>
> - name: Create HTTP Security Group
> local_action:
> module: ec2_group
> region: "{{ region }}"
> vpc_id: "{{ vpc }}"
> name: sg_http
> description: Security group for HTTP access
> rules:
> - proto: tcp
> from_port: 80
> to_port: 80
> cidr_ip: 0.0.0.0/0
> register: sg_http
>
> I would like to write a task which deletes the rule but not security
> group. I tried using the state as present, but it doesn't work
>
> - name: Delete HTTP Rule
> local_action:
> module: ec2_group
> region: "{{ region }}"
> vpc_id: "{{ vpc }}"
> name: sg_http
> description: Security group for HTTP access
> rules:
> - proto: tcp
> from_port: 80
> to_port: 80
> cidr_ip: 0.0.0.0/0
> state: absent
> register: sg_http
>
> What would be the better way to do this. Regards
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/97e4f524-597f-46e5-937e-ba91d0a8a46a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.