From b9f09676bdcf8e0f17d96c6063f939d660e88c47 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Sat, 11 Feb 2017 16:15:37 -0800 Subject: [PATCH] Add xenial support --- ch12/playbooks/ec2-vpc-example.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ch12/playbooks/ec2-vpc-example.yml b/ch12/playbooks/ec2-vpc-example.yml index 5d73109..3e494ac 100755 --- a/ch12/playbooks/ec2-vpc-example.yml +++ b/ch12/playbooks/ec2-vpc-example.yml @@ -111,15 +111,21 @@ 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 -- 2.44.0