amaabca.vpc-subnets
Role Name
An Ansible role to set up a list of VPC subnets in AWS.
Requirements
To get started, run the following commands:
pip install virtualenv
virtualenv .
source bin/activate
pip install -r requirements.txt
Role Variables
You can create multiple subnets for your application with the following details:
subnets:
- az: Availability Zone for the subnet. Example: us-west-1a
cidr: IP range for the subnet
region: Region for the subnet. Example: us-west-1
vpc_id: VPC ID for the subnet. Example: vpc-abc123
app_name: Name of the application the subnet supports. Example: waffles
app_environment: Environment of the application. Example: production
Name: Tag for the subnet, useful for dynamic inventory. Example: "us-west-1a-waffles-production"
Dependencies
No dependencies.
Example Playbook
Here’s how to use the role in a playbook:
- name: Create VPC subnets for the application
hosts: localhost
vars_files:
- "vars/{{ environment }}/subnets.yml"
connection: local
roles:
- ansible-vpc-subnets
Command-Line Example Usage
Run this command to use the playbook:
ansible-playbook subnets.yml -i local -e "environment=production"
License
MIT License
Author Information
Find more about the author at: https://github.com/amaabca
Installa
ansible-galaxy install amaabca.vpc-subnets
Licenza
Unknown
Download
369
Proprietario