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

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey, @Kishore, try something like this:

- hosts: localhost
    - name: Add each EC2 instance to the ELB
        state: present
        ec2_elbs: load-balancer
        region: us-west-1
        instance_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
0 votes
1 answer

Playbook to start ec2 instance

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

answered Apr 8 in Ansible by Kalgi
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,120 points
+13 votes
2 answers
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

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.