Skip to content

Instantly share code, notes, and snippets.

@likwid
Last active December 30, 2015 23:59
Show Gist options
  • Save likwid/7904732 to your computer and use it in GitHub Desktop.
Save likwid/7904732 to your computer and use it in GitHub Desktop.
- name: Find Type=scalr
hosts:
- tag_Type_scalr
connection: local
gather_facts: False
tasks:
- ec2_facts:
- name: Add new instance to scalr hostgroup
local_action: add_host hostname={{ item.public_ip }} groups=scalrs
with_items: ec2.instances
Fastlane:
- ec2_facts:
- name: Add to Blue Load Balancer
local_action:
module: ec2_elb
instance_id: "{{ ansible_ec2_instance_id }}"
ec2_elbs: FastLaneBlue
state: 'present'
region: us-east-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment