Commit b36dac36 by Jason Bau

Use Relative pathes for ora and xqueue auth.json and env.json

parent a6c16cf7
# this gets all running prod webservers # this gets all running prod webservers
#- hosts: tag_environment_prod:&tag_function_webserver #- hosts: tag_environment_prod:&tag_function_webserver
# or we can get subsets of them by name # 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 #- hosts: ~tag_Name_app(11|21)_prod
## these are cold hosts: ## these are cold hosts:
#- hosts: ~tag_Name_app(12|22)_prod #- hosts: ~tag_Name_app(12|22)_prod
...@@ -11,10 +11,6 @@ ...@@ -11,10 +11,6 @@
#- hosts: security_group_edx-prod-EdxappServerSecurityGroup-NSKCQTMZIPQB #- hosts: security_group_edx-prod-EdxappServerSecurityGroup-NSKCQTMZIPQB
sudo: True sudo: True
vars_prompt: 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" - name: "migrate_db"
prompt: "Should this playbook run database migrations? (<Return> for false, anything else for true)" prompt: "Should this playbook run database migrations? (<Return> for false, anything else for true)"
default: false default: false
......
...@@ -4,28 +4,28 @@ ...@@ -4,28 +4,28 @@
# - nginx/tasks/main.yml # - nginx/tasks/main.yml
--- ---
- name: Change permissions on datadir - 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: tags:
- ora - ora
- name: Create ml_models directory - 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: tags:
- ora - ora
# Check out ora repo to $app_base_dir # Check out ora repo to {{ora_code_dir}}
- name: install git and its recommends - name: install git and its recommends
apt: pkg=git state=present install_recommends=yes apt: pkg=git state=present install_recommends=yes
tags: tags:
- ora - ora
- name: create ora application config - 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: tags:
- ora - ora
- name: create ora auth file - 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: tags:
- ora - ora
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# - nginx/tasks/main.yml # - nginx/tasks/main.yml
--- ---
- name: Change permissions on datadir - 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: tags:
- xqueue - xqueue
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
state=present state=present
encoding=utf8 encoding=utf8
# Check out xqueue repo to $app_base_dir # Check out xqueue repo to {{xqueue_code_dir}}
- name: install git and its recommends - name: install git and its recommends
apt: pkg=git state=present install_recommends=yes apt: pkg=git state=present install_recommends=yes
tags: tags:
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
- xqueue - xqueue
- name: create xqueue application config - 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: notify:
- restart xqueue - restart xqueue
- restart xqueue consumer - restart xqueue consumer
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
- xqueue - xqueue
- name: create xqueue auth file - 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: notify:
- restart xqueue - restart xqueue
- restart xqueue consumer - 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