How to create an Elastic Load Balancer in AWS with Ansible Playbook

0 votes

Hi Guys,

I have configured the EC2 instance with the Ansible Playbook. Now I want to launch assign an instance with an ELB. How can I do that using Ansible Playbook?

Oct 12, 2020 in Ansible by akhtar
• 38,230 points
903 views

1 answer to this question.

0 votes

Hi@akhtar,

You can find one module in ansible named ec2_elb_lb. This module is used to cretae an ELB in AWS. You can see the below playbook.

- name: Create the ELB only listening over port 80
  ec2_elb_lb:
  name: nickhammond-load-balancer
    state: present
    region: us-west-1
    zones:
      - us-west-1a
      - us-west-1b
    listeners:
      - protocol: http
        load_balancer_port: 80
        instance_port: 80
  register: elb
answered Oct 12, 2020 by MD
• 95,440 points

Related Questions In Ansible

0 votes
1 answer

How to configure the Nginx server in AWS with Ansible Playbook?

Hi@akhtar, To configure the Nginx server in AWS, ...READ MORE

answered Oct 12, 2020 in Ansible by MD
• 95,440 points
2,775 views
0 votes
1 answer

Ansible Playbook to create a Load Balancer

Hey @Himanshu, you can try something like ...READ MORE

answered Mar 25, 2019 in Ansible by Jack
2,300 views
0 votes
1 answer

How to create a variable in Ansible Playbook?

Hi@akhtar, Variable in playbooks are very similar to using variables in ...READ MORE

answered Aug 2, 2020 in Ansible by MD
• 95,440 points
1,047 views
0 votes
1 answer

How to create a key pair on AWS using Ansible-Playbook?

Hi@akhtar, You can find the ec2_key module in ...READ MORE

answered Aug 12, 2020 in Ansible by MD
• 95,440 points
1,121 views
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,090 points
2,435 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,460 views
0 votes
1 answer

How to create an encrypted bucket in AWS using Ansible Playbook?

Hi@akhtar, Sometimes it is required to encrypt the ...READ MORE

answered Dec 4, 2020 in Ansible by MD
• 95,440 points
557 views
0 votes
1 answer

How to create a security group in AWS using Ansible-Playbook?

Hi@akhtar, You can use the ec2_group module in ...READ MORE

answered Aug 13, 2020 in Ansible by MD
• 95,440 points
3,379 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP