Commit c2fad03f by Jason Bau

Merge pull request #162 from edx/jbau/ora-xqueue-relative-env-json-path

Use Relative pathes for ora and xqueue auth.json and env.json
parents b53aeee4 b36dac36
# this gets all running prod webservers
#- hosts: tag_environment_prod:&tag_function_webserver
# or we can get subsets of them by name
- hosts: ~tag_Name_app(4)_prod
- hosts: ~tag_Name_app(12|22)_prod
#- hosts: ~tag_Name_app(11|21)_prod
## these are cold hosts:
#- hosts: ~tag_Name_app(12|22)_prod
......@@ -11,10 +11,6 @@
#- hosts: security_group_edx-prod-EdxappServerSecurityGroup-NSKCQTMZIPQB
sudo: True
vars_prompt:
- name: "lms_version"
prompt: "Enter the edx-platform version: branch, hash, tag, or 'HEAD' (default is edx-west/release)"
default: "edx-west/release"
private: no
- name: "migrate_db"
prompt: "Should this playbook run database migrations? (<Return> for false, anything else for true)"
default: false
......
......@@ -4,28 +4,28 @@
# - nginx/tasks/main.yml
---
- name: Change permissions on datadir
file: path={{ app_base_dir }}/data state=directory owner=www-data group=www-data
file: path={{ora_code_dir}}/../data state=directory owner=www-data group=www-data
tags:
- ora
- name: Create ml_models directory
file: path={{ app_base_dir }}/ml_models state=directory owner=www-data group=www-data
file: path={{ora_code_dir}}/../ml_models state=directory owner=www-data group=www-data
tags:
- ora
# Check out ora repo to $app_base_dir
# Check out ora repo to {{ora_code_dir}}
- name: install git and its recommends
apt: pkg=git state=present install_recommends=yes
tags:
- ora
- name: create ora application config
template: src=ora.env.json.j2 dest=$app_base_dir/env.json mode=0640 owner=www-data group=adm
template: src=ora.env.json.j2 dest={{ora_code_dir}}/../env.json mode=0640 owner=www-data group=adm
tags:
- ora
- name: create ora auth file
template: src=ora.auth.json.j2 dest=$app_base_dir/auth.json mode=0640 owner=www-data group=adm
template: src=ora.auth.json.j2 dest={{ora_code_dir}}/../auth.json mode=0640 owner=www-data group=adm
tags:
- ora
......
......@@ -4,7 +4,7 @@
# - nginx/tasks/main.yml
---
- name: Change permissions on datadir
file: path={{ app_base_dir }}/data state=directory owner=www-data group=www-data
file: path={{xqueue_code_dir}}/../data state=directory owner=www-data group=www-data
tags:
- xqueue
......@@ -17,7 +17,7 @@
state=present
encoding=utf8
# Check out xqueue repo to $app_base_dir
# Check out xqueue repo to {{xqueue_code_dir}}
- name: install git and its recommends
apt: pkg=git state=present install_recommends=yes
tags:
......@@ -32,7 +32,7 @@
- xqueue
- name: create xqueue application config
template: src=xqueue.env.json.j2 dest=$app_base_dir/env.json mode=0640 owner=www-data group=adm
template: src=xqueue.env.json.j2 dest={{xqueue_code_dir}}/../env.json mode=0640 owner=www-data group=adm
notify:
- restart xqueue
- restart xqueue consumer
......@@ -40,7 +40,7 @@
- xqueue
- name: create xqueue auth file
template: src=xqueue.auth.json.j2 dest=$app_base_dir/auth.json mode=0640 owner=www-data group=adm
template: src=xqueue.auth.json.j2 dest={{xqueue_code_dir}}/../auth.json mode=0640 owner=www-data group=adm
notify:
- restart xqueue
- restart xqueue consumer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment