Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mandar242 committed Nov 21, 2024
1 parent d7b8b80 commit c8aa0d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
9 changes: 2 additions & 7 deletions roles/ec2_instance_create/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A role to create an EC2 instance in AWS.

Users can specify various parameters for instance configuration, including instance type, AMI ID, key pair, tags, and VPC/subnet configuration.

This role also supports the creation of optional networking resources, such as a security group and an Elastic IP (EIP). You can choose to wait for the EC2 instance to finish booting before continuing.
This role also supports the creation of optional networking resources, such as an external security group and an Elastic IP (EIP). You can choose to wait for the EC2 instance to finish booting before continuing.

## Role Variables

Expand Down Expand Up @@ -68,9 +68,6 @@ The following variables can be set in the role to customize EC2 instance creatio
* **ec2_instance_create_external_sg_description**: (Optional)
A description for the security group. Default is `Security group for external access`.

* **ec2_instance_create_external_sg_port**: (Optional)
The port to open in the security group. Default is `22`.

* **ec2_instance_create_external_sg_rules**: (Optional)
A list of custom rules to add to the security group. Each rule is a dictionary with `proto`, `ports`, and `cidr_ip` keys. Default is to allow SSH (port 22) from `0.0.0.0/0`.

Expand Down Expand Up @@ -102,11 +99,9 @@ Here's an example of how to use the role in a playbook.
ec2_instance_create_associate_external_sg: true
ec2_instance_create_external_sg_name: my-custom-sg
ec2_instance_create_external_sg_description: Security group for my custom access
ec2_instance_create_external_sg_port: 22
ec2_instance_create_external_sg_rules:
- proto: tcp
ports:
- 80
ports: "80"
cidr_ip: "0.0.0.0/0"
ec2_instance_create_sg_tags:
Component: my-custom-sg
Expand Down
3 changes: 1 addition & 2 deletions roles/ec2_instance_create/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ ec2_instance_create_associate_external_sg: false
ec2_instance_create_associate_igw: false
ec2_instance_create_external_sg_description: "Security group for external access"
ec2_instance_create_external_sg_name: "default-external-sg"
ec2_instance_create_external_sg_port: 22
ec2_instance_create_wait_for_boot: true
ec2_instance_create_external_sg_rules:
- proto: tcp
ports: 22
ports: "22"
cidr_ip: "0.0.0.0/0"
6 changes: 0 additions & 6 deletions roles/ec2_instance_create/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ argument_specs:
required: false
default: "Security group for external access"
type: str
ec2_instance_create_external_sg_port:
description:
- The SSH port to open in the security group.
required: false
default: 22
type: int
ec2_instance_create_sg_tags:
description:
- Tags to assign to the security group.
Expand Down

0 comments on commit c8aa0d3

Please sign in to comment.