Using existing security groups in AWS

Hi
Can someone share how can i use an existing security group in AWS while creating an EC2 instance via ansible playbook please?

Sathiya

If you know the existing group id then you can use:

group_id: sg-12345678

Or if you have more than one group:

group_id:

  • sg-12345678

  • sg-87654321