crushlovely.ec2-provision

Ansible Role For EC2 Provisioning

Current Version

This role is used to create EC2 instances. It works within an EC2 VPC, but it hasn’t been tested for EC2 classic networks.

Installation

To install the role, run the following command:

$ ansible-galaxy install crushlovely.ec2_provision,v1.0.0

Variables

Before using this role, you need to set the following variables:

aws:
  ec2_access_key: "Your Amazon IAM access key"
  ec2_secret_key: "Your Amazon secret key"
  keypair: "Your Amazon security key pair"
  image: "Image you want to use"
  acct_vpc_id: "Your EC2 VPC ID"
  region: "us-east-1"
  group: "{{ app_name }}-{{ server_env }}"
  instance_type: "m3.medium"
  quantity: "1"
  vpc_subnet: "Your EC2 VPC subnet"
app_name: test
server_env: qa

You can also create a vars folder in your project and store your variables in a file, then include that file in your playbook like this:

- hosts: localhost
...
  vars_files:
    - vars/default_vars.yml
...

Usage

After installing the role, add it to the roles section of your playbook:

- hosts: localhost
  connection: local
  gather_facts: True
  roles:
    - { role: crushlovely.ec2_provision, zone: "", vpc_subnet: "" }

Dependencies

This role does not depend on ec2_group, but it is recommended to include ec2_group in your playbook to ensure EC2 tags are consistent. You will also need Boto to use this role.

License

MIT

Informazioni sul progetto

Provision EC2 instance

Installa
ansible-galaxy install crushlovely.ec2-provision
Licenza
mit
Download
149
Proprietario