Add xenial support
authorLorin Hochstein <lhochstein@netflix.com>
Sun, 12 Feb 2017 00:15:37 +0000 (16:15 -0800)
committerLorin Hochstein <lhochstein@netflix.com>
Sun, 12 Feb 2017 00:15:37 +0000 (16:15 -0800)
ch12/playbooks/ec2-vpc-example.yml

index 5d73109..3e494ac 100755 (executable)
     register: ec2
   - name: add the instance to web and production groups
     add_host: hostname={{ item.public_dns_name }} groups=web,production
-    with_items: ec2.tagged_instances
+    with_items: "{{ ec2.tagged_instances }}"
     when: item.public_dns_name is defined
   - name: wait for ssh server to be running
     wait_for: host={{ item.public_dns_name }} port=22 search_regex=OpenSSH
-    with_items: ec2.tagged_instances
+    with_items: "{{ ec2.tagged_instances }}"
     when: item.public_dns_name is defined
 
 - name: configure webservers
   hosts: web:&production
   become: True
+  gather_facts: False
+  vars:
+    ansible_python_interpreter: /usr/bin/python2.7
+  pre_tasks:
+    - name: install python
+      raw: apt-get install -y python2.7
   roles:
     - web