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 in Ansible by akhtar
• 33,470 points
62 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 by MD
• 79,350 points

Related Questions In Ansible

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
1,155 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 in Ansible by MD
• 79,350 points
93 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 in Ansible by MD
• 79,350 points
74 views
0 votes
1 answer

How to delete a key pair in AWS from Ansible-Playbook?

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

answered Aug 12 in Ansible by MD
• 79,350 points
63 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
• 57,700 points
914 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
809 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 in Ansible by MD
• 79,350 points
346 views
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 in Ansible by MD
• 79,350 points
81 views