From db5329949ffb1aadb56ca29540dcbca6b4999747 Mon Sep 17 00:00:00 2001 From: Tim Gerla Date: Fri, 19 Apr 2013 13:35:24 -0700 Subject: [PATCH] Minor improvements - default to ansible_default_ipv4.interface - move "repository" variable to webservers - mention 1.2 and CentOS 6 requirements in readme --- lamp_haproxy/README.md | 3 ++- lamp_haproxy/group_vars/all | 1 - lamp_haproxy/group_vars/lbservers | 8 +++++++- lamp_haproxy/group_vars/webservers | 15 ++++++++++++--- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/lamp_haproxy/README.md b/lamp_haproxy/README.md index 9d5941b..34ea32e 100644 --- a/lamp_haproxy/README.md +++ b/lamp_haproxy/README.md @@ -1,7 +1,8 @@ LAMP Stack + HAProxy: Example Playbooks ----------------------------------------------------------------------------- -(This example requires Ansible 1.2) +- Requires Ansible 1.2 +- Expects CentOS/RHEL 6 hosts This example is an extension of the simple LAMP deployment. Here we'll install and configure a web server with an HAProxy load balancer in front, and deploy diff --git a/lamp_haproxy/group_vars/all b/lamp_haproxy/group_vars/all index 9e5363d..7f74b0a 100644 --- a/lamp_haproxy/group_vars/all +++ b/lamp_haproxy/group_vars/all @@ -3,4 +3,3 @@ httpd_port: 80 ntpserver: 192.168.1.2 -repository: http://github.com/bennojoy/mywebapp.git diff --git a/lamp_haproxy/group_vars/lbservers b/lamp_haproxy/group_vars/lbservers index adb658c..4afc351 100644 --- a/lamp_haproxy/group_vars/lbservers +++ b/lamp_haproxy/group_vars/lbservers @@ -16,4 +16,10 @@ daemonname: myapplb balance: roundrobin # Ethernet interface on which the load balancer should listen -iface: eth0 +# Defaults to the first interface. Change this to: +# +# iface: eth1 +# +# ...to override. +# +iface: '{{ ansible_default_ipv4.interface }}' diff --git a/lamp_haproxy/group_vars/webservers b/lamp_haproxy/group_vars/webservers index cae93eb..52d5af4 100644 --- a/lamp_haproxy/group_vars/webservers +++ b/lamp_haproxy/group_vars/webservers @@ -1,8 +1,17 @@ --- # Variables for the web server configuration -# Ethernet interface on which the web server should listen -iface: eth0 +# Ethernet interface on which the web server should listen. +# Defaults to the first interface. Change this to: +# +# iface: eth1 +# +# ...to override. +# +iface: '{{ ansible_default_ipv4.interface }}' -# this is V5 of the test webapp. +# this is the repository that holds our sample webapp +repository: http://github.com/bennojoy/mywebapp.git + +# this is the sha1sum of V5 of the test webapp. webapp_version: 351e47276cc66b018f4890a04709d4cc3d3edb0d