---
- name: Create AWS SecurityGroup (Bastion)
  ec2_group:
    name: "Bastion"
    description: "Bastion"
    purge_rules: false
    purge_rules_egress: false
    region: "{{ aws_region }}"
    vpc_id: "{{ vpc.vpc.id }}"

- name: "Create AWS SecurityGroups"
  ec2_group:
    name: "{{ item.name }}"
    description: "{{ item.name }}"
    purge_rules: false
    purge_rules_egress: false
    region: "{{ aws_region }}"
    vpc_id: "{{ vpc.vpc.id }}"
  register: sg
  with_items:
    - name: "master"
    - name: "infra"
    - name: "node"
