Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
GomathiselviS committed Nov 22, 2024
1 parent b443c35 commit 5a3780a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
- 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([

Check warning on line 31 in extensions/experiences/configure_aws_network/playbooks/run_configure_aws_network.yaml

View workflow job for this annotation

GitHub Actions / ansible-lint

jinja[spacing]

Jinja2 spacing could be improved: {{ sg_internal_rules | default([ {'proto': 'tcp', 'port': '22', 'cidr_ip': vpc_cidr} ]) }} -> {{ sg_internal_rules | default([{'proto': 'tcp', 'port': '22', 'cidr_ip': vpc_cidr}]) }}
{'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 }}"

Check failure on line 39 in extensions/experiences/configure_aws_network/playbooks/run_configure_aws_network.yaml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use ec2_networking_resources_ as a prefix. (vars: aws_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 }}"
2 changes: 1 addition & 1 deletion extensions/experiences/configure_aws_network/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
controller_labels:
- name: cloud.aws_ops
organization: "{{ organization }}"
- name: confgiure_aws_network_experience
- name: configure_aws_network_experience
organization: "{{ organization }}"
- name: run_configure_aws_network
organization: "{{ organization }}"
Expand Down

0 comments on commit 5a3780a

Please sign in to comment.