edx/configuration — pull request #849 by sefk (2014-03-05 18:53:15+00:00)
Title: edx-west: use local temp dir for sockets and ansible cache

@feanil -- this is a change that we've been running with for the last few weeks on edx-west/release. It was pulled into our config branch in #806. This just gets the same change onto master, anticipating that we'll be picking up master at some point soon.

Given that we're doing this already and only affects our plays should be a quick one. Thanks for reviewing. Original commit msg below.

------------------

I was having problems where concurrent installs could trample on each
other. The instance that immediately affected me was output caching
from ec2.py: the output of that command is different between staging and
prod, and both were being written to /tmp/ansible_ec2.cache and .index.

Fix here is to write to a local temp directory. This creates empty temp
dirs to ensure that they are created in all repos.

While less likely, you could have collisions on named ssh sockets.
Those are named with just the instance name, which could be re-used
across VPC's. Putting those in the ./tmp dir too prevents that.

Note that for consistency I did away with just the plain ec2.ini file,
and instead now there are prod- and stage- variants. This is clean but
now means that you'll need to change your install command to look
something like this:

ANSIBLE_EC2_INI=prod-ec2.ini ANSIBLE_CONFIG=prod-ansible.cfg ansible-playbook -c ssh -u ubuntu -i ./ec2.py prod-app.yml

Conflicts:

playbooks/edx-west/ansible.cfg