Playbook to add ec2 instance to ELB

0 votes
How do I write a playbook to add an ec2 instance to ELB?
Mar 25 in Ansible by kishore
13 views

1 answer to this question.

0 votes

Hey, @Kishore, try something like this:

- hosts: localhost
  tasks:
    - name: Add each EC2 instance to the ELB
      ec2_elb:
        state: present
        ec2_elbs: load-balancer
        region: us-west-1
        instance_id: "{{ item.id }}"
      with_items: "{{ ec2_instances.tagged_instances }}"
answered Mar 25 by Yesha

Related Questions In Ansible

0 votes
1 answer
0 votes
0 answers

Error while executing playbook to start ec2 instance

I have a playbook that starts an ...READ MORE

Mar 29 in Ansible by Kalgi
115 views
0 votes
1 answer

Playbook to start ec2 instance

- name: Create an ec2 instance ...READ MORE

answered Apr 8 in Ansible by Kalgi
28 views
0 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
• 56,520 points
136 views
+13 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,380 points
124 views
0 votes
1 answer
0 votes
1 answer

Playbook to add hosts to the known hosts list - Ansible

Hey @Kiran, try something like this: - name: ...READ MORE

answered Mar 25 in Ansible by Haider
73 views