diff --git a/ec2.yml b/ec2.yml index 970ee9c..1285714 100644 --- a/ec2.yml +++ b/ec2.yml @@ -24,10 +24,10 @@ register: ec2 - name: Add new instance to host group add_host: hostname={{ item.public_ip }} groupname={{ groupname }} - with_items: ec2.instances + with_items: "{{ ec2.instances }}" - name: Wait for SSH to come up wait_for: host={{ item.public_dns_name }} port=22 delay=60 timeout=320 state=started - with_items: ec2.instances + with_items: "{{ ec2.instances }}" - name: configure new instance hosts: webservers sudo: yes