Ansible create ELB on AWS
This script will help you when creating an ELB on AWS across AZ using using Ansible
---
- name: This ELB
hosts: localhost
connection: local
gather_facts: False
tasks:
- name: setup
ec2_elb_lb:
name: aws-elb-demo
state: present
region: us-east-2
cross_az_load_balancing: yes
security_group_ids: 'sg-0a7fe79835f81b270'
purge_subnets:
zones:
- us-east-2a
- us-east-2b
listeners:
- protocol: http
load_balancer_port: 80
instance_port: 80
register: aws-elb-demo
---
- name: This ELB
hosts: localhost
connection: local
gather_facts: False
tasks:
- name: setup
ec2_elb_lb:
name: aws-elb-demo
state: present
region: us-east-2
cross_az_load_balancing: yes
security_group_ids: 'sg-0a7fe79835f81b270'
purge_subnets:
zones:
- us-east-2a
- us-east-2b
listeners:
- protocol: http
load_balancer_port: 80
instance_port: 80
register: aws-elb-demo
Comments
Post a Comment