• 
      

    Add easy population of roledefs from tagged EC2 instances.

    Review Request #5649 — Created March 21, 2014 and submitted — Latest diff uploaded

    Information

    fabazon
    master
    b0ad41a...

    Reviewers

    This makes it easy for a Fabric script to populate an env.roledefs
    based on tagged EC2 instances.

    A Fabric script just needs to import fabazon.roles.EC2RoleDefs and
    assign an instance to env.roledefs, passing in the list of regions,
    any role names, an optional tag attribute name, and an optional
    dictionary of tags that each matched entry must have set.

    The list of hosts will be looked up on demand, saving API requests and
    keeping the Fabric script pretty quick.

    Tested with a Fabric file, and saw it fetch the correct list of hostnames
    on demand based on what was tagged in our list of EC2 instances.