Help with EC2 Module

15 views
Skip to first unread message

Aaron Gibson

unread,
May 27, 2015, 1:06:38 PM5/27/15
to ansible...@googlegroups.com
Hello Ansible pro's, I am new to the tool and looking to solve a use case. I would like to complete a basic rolling update for our site, basically I want to deregister a web from an EC2 ELB, do some updates, then add it back in. I have been struggling with the playbook for this

I have a simple inventory file, it identifies one host under the [web] section. I also defined a variables file, I set the EC2 access and key, I then have the following .yml file:

---
- name: remove from elb
  hosts: web
  vars_files:
  - vars.yml
  tasks:
    - name: gathering ec2_facts
      action: ec2_facts
    - name: remove from elb
      ec2_elb:
        aws_access_key: "{{ ec2_access_key }}"
        aws_secret_key: "{{ ec2_secret_key }}"
        instance_id: "{{ my_instance_id }}"
        state: absent
        wait: yes

I cobbled this together from the interwebs, however I am getting the following error and ainsible is not really telling me (the non-initiated) anything.

Any help is much appreciated!

-Aaron.


Reply all
Reply to author
Forward
0 new messages