Skip to content

Commit

Permalink
Replaced VirtualBox image reference with trusty (Ubuntu 14.04), added…
Browse files Browse the repository at this point in the history
… task to upgrade pip, used recommended syntax for environment variable.
  • Loading branch information
jcalazan committed Feb 28, 2016
1 parent fe67932 commit 6cc4a33
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -14,7 +14,7 @@ Ansible Playbook designed for environments running a Django app. It can install

Default settings are stored in ```roles/role_name/vars/main.yml```. Environment-specific settings are in the ```env_vars``` directory.

**Tested with OS:** Ubuntu 12.04 LTS x64, Ubuntu 14.04 LTS x64
**Tested with OS:** Ubuntu 14.04 LTS x64

**Tested with Cloud Providers:** [Digital Ocean](https://www.digitalocean.com/?refcode=5aa134a379d7), [Amazon](https://aws.amazon.com), [Rackspace](http://www.rackspace.com/)

Expand Down
6 changes: 3 additions & 3 deletions Vagrantfile
Expand Up @@ -5,8 +5,8 @@
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.box = "trusty64"
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"

config.vm.network :private_network, ip: "192.168.33.15"

Expand All @@ -22,6 +22,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision "ansible" do |ansible|
ansible.playbook = "vagrant.yml"
ansible.host_key_checking = false
ansible.verbose = "v"
ansible.verbose = "vv"
end
end
4 changes: 2 additions & 2 deletions roles/base/tasks/main.yml
Expand Up @@ -27,6 +27,6 @@
- supervisor
tags: packages

- name: Install virtualenv
pip: name=virtualenv
- name: Upgrade pip
pip: name=pip state=latest
tags: packages
16 changes: 0 additions & 16 deletions roles/rabbitmq/tasks/install_erlang.yml

This file was deleted.

2 changes: 0 additions & 2 deletions roles/rabbitmq/tasks/main.yml
@@ -1,7 +1,5 @@
---

- include: install_erlang.yml

- name: Add the RabbitMQ public GPG key to the apt repo
apt_key: url=http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
state=present
Expand Down
9 changes: 6 additions & 3 deletions roles/web/tasks/setup_django_app.yml
Expand Up @@ -3,13 +3,16 @@
- name: Install packages required by the Django app inside virtualenv
pip: virtualenv={{ virtualenv_path }} requirements={{ requirements_file }}

- name: Ensure the manage.py file is executable
acl: name="{{ project_path }}/manage.py" etype=user permissions="rwx" state=present

- name: Run the Django syncdb command
django_manage:
command: syncdb
app_path: "{{ project_path }}"
virtualenv: "{{ virtualenv_path }}"
settings: "{{ django_settings_file }}"
environment: django_environment
environment: "{{ django_environment }}"
when: run_django_syncdb is defined and run_django_syncdb
tags: django.syncdb

Expand All @@ -19,7 +22,7 @@
app_path: "{{ project_path }}"
virtualenv: "{{ virtualenv_path }}"
settings: "{{ django_settings_file }}"
environment: django_environment
environment: "{{ django_environment }}"
when: run_django_db_migrations is defined and run_django_db_migrations
tags: django.migrate

Expand All @@ -29,6 +32,6 @@
app_path: "{{ project_path }}"
virtualenv: "{{ virtualenv_path }}"
settings: "{{ django_settings_file }}"
environment: django_environment
environment: "{{ django_environment }}"
when: run_django_collectstatic is defined and run_django_collectstatic
tags: django.collectstatic
4 changes: 4 additions & 0 deletions roles/web/tasks/setup_virtualenv.yml
@@ -1,5 +1,9 @@
---

- name: Install virtualenv
pip: name=virtualenv
tags: packages

- name: Create the virtualenv
command: virtualenv {{ virtualenv_path }} --no-site-packages
creates={{ virtualenv_path }}/bin/activate
Expand Down

0 comments on commit 6cc4a33

Please sign in to comment.