Commit 5715d99b by Feanil Patel

Add a way to update legacy ora configuration.

parent 760b97da
# ansible-playbook -i ec2.py --limit="tag_group_grader:&tag_environment_stage" legacy_ora.yml -e "COMMON_ENV_TYPE=stage secure_dir=/path/to/secure/dir"
- name: Deploy legacy_ora
hosts: all
sudo: True
gather_facts: True
vars:
ora_app_dir: '/opt/wwc'
ora_user: 'www-data'
roles:
- legacy_ora
#
# Update config for a legacy ora installation.
#
# This role requires that ora_app_dir and ora_user both be defined.
# There is no default for them.
#
- name: legacy_ora | create ora application config
file:
src={{secure_dir}}/files/{{COMMON_ENV_TYPE}}/legacy_ora/ora.env.json
dest={{ora_app_dir}}/env.json
sudo_user: "{{ ora_user }}"
register: env_state
tags:
- deploy
- name: legacy_ora | create ora auth file
file:
src={{secure_dir}}/files/{{COMMON_ENV_TYPE}}/legacy_ora/ora.auth.json
dest={{ora_app_dir}}/auth.json
sudo_user: "{{ ora_user }}"
register: auth_state
tags:
- deploy
# Restart ORA Services
- name: legacy_ora | restart edx-ora
service:
name=edx-ora
state=restarted
when: env_state.changed and auth_state.changed
- name: legacy_ora | restart edx-ora-celery
service:
name=edx-ora-celery
state=restarted
when: env_state.changed and auth_state.changed
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