acandid.aws_ec2
Ansible Role: aws_ec2
=========
This is a simple Ansible role for creating an EC2 instance in AWS.
Requirements
Before you begin, make sure you have the following packages installed on your Ansible server:
- epel-release
- python2-pip
- boto
- boto3
Role Variables
None of the following variables are mandatory, but you can configure them as needed:
| Variable | Default | Description | 
|---|---|---|
| aws_access_key | Your AWS ACCESS KEY | |
| aws_secret_key | Your AWS SECRET KEY | |
| vpc_id_default | Your VPC ID | |
| instance_type | Type of instance, e.g., t2.micro | |
| first_name | First name tag for the instance | |
| second_name | Second name tag for the instance, e.g., | |
| environment_name | Environment tag for the instance | |
| aws_region | AWS region, e.g., Ohio: us-east-2 | |
| subnet1 | Default subnet, e.g., Ohio 172.31.32.0/20: subnet-040acd48 | |
| subnet2 | Default subnet, e.g., Ohio 172.31.16.0/20: subnet-e5d14e9f | |
| subnet3 | Default subnet, e.g., Ohio 172.31.0.0/20: subnet-f78aac9f | |
| aws_image | Image ID, e.g., Red Hat 8: ami-05220ffa0e7fce3d1 | |
| keypair_name | Name for your key pair | |
| path | Location to save the key pair | |
| sg_group_name | Name of the Security Group | |
| ssh_port | Port for SSH access, default is 22 | |
| cidr_ip_inbound | Allowed IP for SSH access, e.g., anywhere: 0.0.0.0/0 | |
| cidr_ip_outbound | Allows server access to the Internet | |
| outbound_name | Name for OutBound | 
Dependencies
There are no dependencies.
Example Inventory File
[local]
localhost
Example Playbook
---
- hosts: local
  connection: local
  gather_facts: false
  roles:
    - /path/aws_ec2
Contributing
If you have any issues, requests for new features, or ideas, please post them in the Issues section.
Author Information
LinkedIn: Almir Candido
Installa
 ansible-galaxy install acandid.aws_ec2Licenza
 
            Unknown
          
Download
 
            330
          
Proprietario
 