diff --git a/extensions/experiences/configure_aws_network/playbooks/run_configure_aws_network.yml b/extensions/experiences/configure_aws_network/playbooks/run_configure_aws_network.yml deleted file mode 100644 index f4fab23..0000000 --- a/extensions/experiences/configure_aws_network/playbooks/run_configure_aws_network.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -- name: Create necessary network resources - hosts: localhost - gather_facts: false - tasks: - - name: Create a list of dictionaries for security group rules - ansible.builtin.set_fact: - sg_internal_rules: >- - {{ - [ - { - 'proto': security_group_1_proto, - 'ports': security_group_1_port, - 'cidr_ip': security_group_1_cidr - }, - { - 'proto': security_group_2_proto, - 'ports': security_group_2_port, - 'cidr_ip': security_group_2_cidr - }, - { - 'proto': security_group_3_proto, - 'ports': security_group_3_port, - 'cidr_ip': security_group_3_cidr - } - ] | selectattr('proto', 'defined') | selectattr('ports', 'defined') | selectattr('cidr_ip', 'defined') | list - }} - - - name: Set default value for the security group rules if nothing is passed. - ansible.builtin.set_fact: - sg_internal_rules: "{{ sg_internal_rules | default([ - {'proto': 'tcp', 'port': '22', 'cidr_ip': vpc_cidr} - ]) }}" - - - name: Configure Network resources - ansible.builtin.include_role: - name: cloud.aws_ops.ec2_networking_resources - vars: - aws_region: "{{ region }}" - ec2_networking_resources_vpc_name: "{{ vpc_name }}" - ec2_networking_resources_vpc_cidr_block: "{{ vpc_cidr }}" - ec2_networking_resources_subnet_cidr_block: "{{ subnet }}" - ec2_networking_resources_sg_internal_name: "{{ security_group_internal }}" - ec2_networking_resources_sg_internal_description: "{{ security_group_internal_description }}" - ec2_networking_resources_sg_internal_rules: "{{ sg_internal_rules }}"