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.