Commit f69e9912 by John Jarvis

Merge pull request #1725 from edx/jarv/config-refactor-wip

Writes yaml files to a new directory EDXAPP_CFG_DIR
parents cdc6cc63 f7213f13
......@@ -171,7 +171,6 @@ EDXAPP_DEFAULT_FEEDBACK_EMAIL: 'feedback@example.com'
EDXAPP_DEFAULT_SERVER_EMAIL: 'devops@example.com'
EDXAPP_BULK_EMAIL_DEFAULT_FROM_EMAIL: 'no-reply@example.com'
EDXAPP_UNIVERSITY_EMAIL: 'university@example.com'
EDXAPP_FINANCE_EMAIL: 'finance@example.com'
EDXAPP_PRESS_EMAIL: 'press@example.com'
EDXAPP_PLATFORM_TWITTER_ACCOUNT: '@YourPlatformTwitterAccount'
EDXAPP_PLATFORM_FACEBOOK_ACCOUNT: 'http://www.facebook.com/YourPlatformFacebookAccount'
......@@ -316,6 +315,7 @@ EDXAPP_CODE_JAIL_LIMITS:
REALTIME: 3
# Needs to be non-zero so that jailed code can use it as their temp directory.(1MiB in bytes)
FSIZE: 1048576
CPU: 1
EDXAPP_VIRTUAL_UNIVERSITIES: []
EDXAPP_SUBDOMAIN_BRANDING: {}
......@@ -366,6 +366,8 @@ EDXAPP_CELERY_WORKERS:
EDXAPP_DEFAULT_CACHE_VERSION: "1"
EDXAPP_OAUTH_ENFORCE_SECURE: True
# Directory for edxapp application configuration files
EDXAPP_CFG_DIR: "{{ COMMON_CFG_DIR }}/edxapp"
EDXAPP_DEPRECATED_ADVANCED_COMPONENT_TYPES: []
#-------- Everything below this line is internal to the role ------------
......@@ -627,7 +629,6 @@ generic_env_config: &edxapp_generic_env
CAS_ATTRIBUTE_CALLBACK: "{{ EDXAPP_CAS_ATTRIBUTE_CALLBACK }}"
HOSTNAME_MODULESTORE_DEFAULT_MAPPINGS: "{{ EDXAPP_MODULESTORE_MAPPINGS }}"
UNIVERSITY_EMAIL: "{{ EDXAPP_UNIVERSITY_EMAIL }}"
FINANCE_EMAIL: "{{ EDXAPP_FINANCE_EMAIL }}"
PRESS_EMAIL: "{{ EDXAPP_PRESS_EMAIL }}"
PLATFORM_TWITTER_ACCOUNT: "{{ EDXAPP_PLATFORM_TWITTER_ACCOUNT }}"
PLATFORM_FACEBOOK_ACCOUNT: "{{ EDXAPP_PLATFORM_FACEBOOK_ACCOUNT }}"
......@@ -641,7 +642,6 @@ generic_env_config: &edxapp_generic_env
VIRTUAL_UNIVERSITIES: "{{ EDXAPP_VIRTUAL_UNIVERSITIES }}"
SUBDOMAIN_BRANDING: "{{ EDXAPP_SUBDOMAIN_BRANDING }}"
REGISTRATION_EXTRA_FIELDS: "{{ EDXAPP_REGISTRATION_EXTRA_FIELDS }}"
DEPRECATED_ADVANCED_COMPONENT_TYPES: "{{ EDXAPP_DEPRECATED_ADVANCED_COMPONENT_TYPES }}"
lms_auth_config:
<<: *edxapp_generic_auth
......
......@@ -7,6 +7,14 @@
owner={{ edxapp_user }} group={{ common_web_user }}
mode=0644
- name: create edxapp configuration dir
file: >
path="{{ EDXAPP_CFG_DIR }}" state=directory
owner="{{ edxapp_user }}" group="{{ common_web_group }}"
notify:
- "restart edxapp"
- "restart edxapp_workers"
# Optional auth for git
- name: create ssh script for git (not authenticated)
template: >
......
......@@ -20,6 +20,29 @@
- "restart edxapp_workers"
with_items: service_variants_enabled
- name: "create {{ item }} application config"
template: >
src={{ item }}.env.yaml.j2
dest={{ EDXAPP_CFG_DIR }}/{{ item }}.env.yaml
sudo_user: "{{ edxapp_user }}"
tags: edxapp_cfg
with_items: service_variants_enabled
notify:
- "restart edxapp"
- "restart edxapp_workers"
- name: "create {{ item }} auth file"
template: >
src={{ item }}.auth.yaml.j2
dest={{ EDXAPP_CFG_DIR }}/{{ item }}.auth.yaml
sudo_user: "{{ edxapp_user }}"
tags: edxapp_cfg
notify:
- "restart edxapp"
- "restart edxapp_workers"
with_items: service_variants_enabled
# write the supervisor scripts for the service variants
- name: "writing {{ item }} supervisor script"
......
{{ cms_auth_config | to_nice_yaml }}
{{ cms_env_config | to_nice_yaml }}
{{ lms_auth_config | to_nice_yaml }}
{{ lms_env_config | to_nice_yaml }}
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