February 2018
Intermediate to advanced
200 pages
5h 51m
English
Let's start by creating an ELB. We will need to add the ELB to a security group. We also need to provide the region and subnet in which we want to create the ELB. We will make this ELB serve HTTP requests on port 80 and route the requests to port 80 of the instance:
- name: Create ELB in public subnet ec2_elb_lb: state: present name: "{{ elb_name }}" security_group_ids: "{{ my_first_sg.group_id }}" region: "{{ aws_region }}" subnets: "{{ my_public_subnet.subnet.id }}" aws_access_key: "{{ access_key }}" aws_secret_key: "{{ secret_key }}" purge_subnets: yes listeners: - protocol: http load_balancer_port: 80 instance_port: 80 register: my_first_elb tags: - elb - recipe8
Once our ELB is set up, we need to identify the instances ...
Read now
Unlock full access