Giter VIP home page Giter VIP logo

ansible-role-ec2-init's Introduction

OULibraries.ec2-init

OULibraries EC2 init.

Requirements

Uses the EC2 module, so the boto package is required. Now requires Ansible 2.x

Role Variables

You'll need to define at least one user in the 'users' var. eg.

users:
  - name: 'centos'
    groups: 'wheel,apache'
    keyname: 'aws-name-for-key'
    pubkey: 'ssh-rsa somepubkey [email protected]'

The first user and key listed will be used to launch the instance. The first user's key key will be added to aws if it isn't already there.

Other vars that are the same across boxes:

ec2_vpc_id: The VPC to which you wish to apply the security groups ec2_vpc_subnet_id: The VPC subnet to which you wish to deploy this machine ec2_security_groups: the definition of the security groups you are using, eg.

ec2_security_groups:
  - name: out_all
    description: allow all outbound traffic
    rules: []
    rules_egress:
      - proto: all
        from_port: 0
        to_port: 65535
        cidr_ip: 0.0.0.0/0
  - name: in_ssh_broker
    description: allow inbound ssh from broker
    rules:
      - proto: tcp
        from_port: 22
        to_port: 22
        cidr_ip: 192.168.1.10/32
    rules_egress: []

See the docs for the ec2_group Ansible module for more info on managing groups.

ec2_instances: instance-unique info. tags and security groups. Will probably move more config into this later as currently, you can only spin up instances of the sames size.

ec2_tag_name should be the internal dns name of your instance. Note that this means that you either need to implement your own dns in aws, or you'll need to wrangle hosts files.

ec2_security_group: a list of security group names to apply to this machine

ec2_instances:
  - ec2_tag_Name: app.dev.department.ec2.internal
    ec2_tag_Environment: Development
    ec2_tag_Product: Default
    ec2_tag_Role: Default
    ec2_tag_Unit: Default
    ec2_security_group: ['out_all', 'in_ssh_broker']

For the rest, see defaults/main.yml

Dependencies

A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.

Example Playbook

License

MIT

Author Information

Jason Sherman

ansible-role-ec2-init's People

Contributors

jsnshrmn avatar lo5an avatar v13abh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.