playbooks/edx-east/roles/edxapp/defaults/main.yml [3:1253]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---

# These are variables that default to a localhost
# setup and are meant to be overwritten for
# different environments.
#
# Variables in all caps are environment specific
# Lowercase variables are internal to the role
#
# Defaults specified here should not contain
# any secrets or host identifying information.
#
# Variables set to "None" will be converted to None
# when the edxapp config is written to disk.

# Bucket used for xblock file storage
EDXAPP_XBLOCK_FS_STORAGE_BUCKET: "None"
EDXAPP_XBLOCK_FS_STORAGE_PREFIX: "None"
EDXAPP_DJFS:
  type: 'osfs'
  directory_root: '{{ edxapp_data_dir }}/django-pyfs/static/django-pyfs'
  url_root : '/static/django-pyfs'

EDXAPP_LMS_BASE: "{{ EDXAPP_LMS_SITE_NAME }}:{{ EDXAPP_LMS_NGINX_PORT }}"
EDXAPP_PREVIEW_LMS_BASE: "preview.{{ EDXAPP_LMS_SITE_NAME }}:{{ EDXAPP_LMS_NGINX_PORT }}"
EDXAPP_CMS_BASE: "{{ EDXAPP_CMS_SITE_NAME }}:{{ EDXAPP_CMS_NGINX_PORT }}"

EDXAPP_LMS_GUNICORN_EXTRA: ""
EDXAPP_LMS_GUNICORN_EXTRA_CONF: ""

EDXAPP_CMS_GUNICORN_EXTRA: ""
EDXAPP_CMS_GUNICORN_EXTRA_CONF: ""

# Set this to the maximum number
# of requests for gunicorn for the lms and cms
# gunicorn --max-requests <num>
EDXAPP_LMS_MAX_REQ: !!null
EDXAPP_CMS_MAX_REQ: !!null
# 'None' will be written out as null in
# the configuration on disk
EDXAPP_AWS_ACCESS_KEY_ID:  "None"
EDXAPP_AWS_SECRET_ACCESS_KEY:  "None"
EDXAPP_AZURE_ACCOUNT_NAME: "None"
EDXAPP_AZURE_ACCOUNT_KEY: "None"
EDXAPP_AZURE_CONTAINER: "None"
EDXAPP_AWS_QUERYSTRING_AUTH: false
EDXAPP_AWS_STORAGE_BUCKET_NAME: "SET-ME-PLEASE (ex. bucket-name)"
EDXAPP_IMPORT_EXPORT_BUCKET: "SET-ME-PLEASE (ex. bucket-name)"
EDXAPP_AWS_S3_CUSTOM_DOMAIN: "SET-ME-PLEASE (ex. bucket-name.s3.amazonaws.com)"
EDXAPP_SWIFT_USERNAME: "None"
EDXAPP_SWIFT_KEY: "None"
EDXAPP_SWIFT_TENANT_ID: "None"
EDXAPP_SWIFT_TENANT_NAME: "None"
EDXAPP_SWIFT_AUTH_URL: "None"
EDXAPP_SWIFT_AUTH_VERSION: "None"
EDXAPP_SWIFT_REGION_NAME: "None"
EDXAPP_SWIFT_USE_TEMP_URLS: false
EDXAPP_SWIFT_TEMP_URL_KEY: "None"
EDXAPP_SWIFT_TEMP_URL_DURATION: 1800  # seconds
EDXAPP_DEFAULT_FILE_STORAGE:  "django.core.files.storage.FileSystemStorage"
EDXAPP_XQUEUE_BASIC_AUTH: [ "{{ COMMON_HTPASSWD_USER }}", "{{ COMMON_HTPASSWD_PASS }}" ]
EDXAPP_XQUEUE_DJANGO_AUTH:
  username: 'lms'
  password: 'password'
EDXAPP_XQUEUE_URL: 'http://localhost:18040'

EDXAPP_MONGO_HOSTS: ['localhost']
EDXAPP_MONGO_PASSWORD: 'password'
EDXAPP_MONGO_PORT: 27017
EDXAPP_MONGO_USER: 'edxapp'
EDXAPP_MONGO_DB_NAME: 'edxapp'
EDXAPP_MONGO_USE_SSL: False

EDXAPP_MYSQL_DB_NAME: 'edxapp'
EDXAPP_MYSQL_USER: 'edxapp001'
EDXAPP_MYSQL_USER_ADMIN: 'root'
EDXAPP_MYSQL_PASSWORD: 'password'
EDXAPP_MYSQL_PASSWORD_READ_ONLY: 'password'
EDXAPP_MYSQL_PASSWORD_ADMIN: 'password'
EDXAPP_MYSQL_REPLICA_DB_NAME: "{{ EDXAPP_MYSQL_DB_NAME }}"
EDXAPP_MYSQL_REPLICA_USER: "{{ EDXAPP_MYSQL_USER }}"
EDXAPP_MYSQL_REPLICA_PASSWORD: "{{ EDXAPP_MYSQL_PASSWORD }}"
EDXAPP_MYSQL_REPLICA_HOST: "{{ EDXAPP_MYSQL_HOST }}"
EDXAPP_MYSQL_REPLICA_PORT: "{{ EDXAPP_MYSQL_PORT }}"
EDXAPP_MYSQL_CSMH_DB_NAME: "edxapp_csmh"
EDXAPP_MYSQL_CSMH_USER: "{{ EDXAPP_MYSQL_USER }}"
EDXAPP_MYSQL_CSMH_PASSWORD: "{{ EDXAPP_MYSQL_PASSWORD }}"
EDXAPP_MYSQL_CSMH_HOST: "{{ EDXAPP_MYSQL_HOST }}"
EDXAPP_MYSQL_CSMH_PORT: "{{ EDXAPP_MYSQL_PORT }}"

EDXAPP_MYSQL_HOST: 'localhost'
EDXAPP_MYSQL_PORT: '3306'

# list of dictionaries of the format
# { 'host': 'hostname', 'port': 'portnumber', 'otherconfigsuchas use_ssl': 'True' }
# http://elasticsearch-py.readthedocs.org/en/master/api.html#elasticsearch
EDXAPP_ELASTIC_SEARCH_CONFIG:
    - host: "localhost"
      port: 9200

EDXAPP_SETTINGS: '{{ COMMON_EDXAPP_SETTINGS }}'

EDXAPP_LMS_ENV: 'lms.envs.{{ EDXAPP_SETTINGS }}'
EDXAPP_CMS_ENV: 'cms.envs.{{ EDXAPP_SETTINGS }}'

EDXAPP_EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'
EDXAPP_EMAIL_HOST: 'localhost'
EDXAPP_EMAIL_PORT: 25
EDXAPP_EMAIL_USE_TLS: False
EDXAPP_EMAIL_HOST_USER: ''
EDXAPP_EMAIL_HOST_PASSWORD: ''

EDXAPP_AWS_SES_REGION_NAME: "us-east-1"
EDXAPP_AWS_SES_REGION_ENDPOINT: "email.us-east-1.amazonaws.com"

EDXAPP_LOG_LEVEL: 'INFO'

EDXAPP_MEMCACHE: [ 'localhost:11211' ]
EDXAPP_CACHE_COURSE_STRUCTURE_MEMCACHE: "{{ EDXAPP_MEMCACHE }}"
EDXAPP_COMMENTS_SERVICE_URL:  'http://localhost:18080'
# EDXAPP_COMMENTS_SERVICE_KEY must match FORUM_API_KEY
EDXAPP_COMMENTS_SERVICE_KEY:  'password'

EDXAPP_SESSION_INACTIVITY_TIMEOUT_IN_SECONDS: ""
RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS: ""
EDXAPP_RETRY_ACTIVATION_EMAIL_TIMEOUT: ""
EDXAPP_RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS: ""
EDXAPP_COURSE_CATALOG_VISIBILITY_PERMISSION: ""
EDXAPP_COURSE_ABOUT_VISIBILITY_PERMISSION: ""
EDXAPP_COUNTRIES_OVERRIDE: null
EDXAPP_ALL_LANGUAGES_OVERRIDE: null
EDXAPP_PASSWORD_MIN_LENGTH: ""
EDXAPP_PASSWORD_MAX_LENGTH: ""
EDXAPP_PASSWORD_COMPLEXITY: ""
EDXAPP_ENFORCE_PASSWORD_POLICY: ""
EDXAPP_X_FRAME_OPTIONS: ""

EDXAPP_EDXAPP_SECRET_KEY: "DUMMY KEY CHANGE BEFORE GOING TO PRODUCTION"

EDXAPP_ANALYTICS_API_KEY:  ""
EDXAPP_LTI_USER_EMAIL_DOMAIN: "lti.example.com"
# 900s, or 15 mins
EDXAPP_LTI_AGGREGATE_SCORE_PASSBACK_DELAY: 900
EDXAPP_PAYMENT_SUPPORT_EMAIL: "billing@example.com"
EDXAPP_YOUTUBE_API_KEY: "PUT_YOUR_API_KEY_HERE"
EDXAPP_ZENDESK_USER: ""
EDXAPP_ZENDESK_URL: ""
EDXAPP_ZENDESK_API_KEY: ""
EDXAPP_ZENDESK_CUSTOM_FIELDS: {}
EDXAPP_CELERY_USER: 'celery'
EDXAPP_CELERY_PASSWORD: 'celery'
EDXAPP_CELERY_BROKER_VHOST: ""
EDXAPP_CELERY_BROKER_USE_SSL: false

EDXAPP_VIDEO_CDN_URLS:
  EXAMPLE_COUNTRY_CODE: "http://example.com/edx/video?s3_url="

EDXAPP_CREDIT_HELP_LINK_URL: ""

EDXAPP_PARTNER_SUPPORT_EMAIL: ''

# ISO-8601 formatted date string, or null
EDXAPP_AUDIT_CERT_CUTOFF_DATE: null

EDXAPP_PLATFORM_NAME: 'Your Platform Name Here'
EDXAPP_STUDIO_NAME: 'Studio'
EDXAPP_STUDIO_SHORT_NAME: 'Studio'

EDXAPP_CAS_SERVER_URL: ""
EDXAPP_CAS_EXTRA_LOGIN_PARAMS: ""
EDXAPP_CAS_ATTRIBUTE_CALLBACK: ""
EDXAPP_CAS_ATTRIBUTE_PACKAGE: ""
# Enable an end-point that creates a user and logs them in
# Used for performance testing
EDXAPP_ENABLE_AUTO_AUTH: false
# Settings for enabling and configuring third party authorization
EDXAPP_ENABLE_THIRD_PARTY_AUTH: false
EDXAPP_ENABLE_OAUTH2_PROVIDER: false

EDXAPP_ENABLE_MOBILE_REST_API: false

# Settings for API access management
EDXAPP_API_ACCESS_MANAGER_EMAIL: "api-access@example.com"
EDXAPP_API_ACCESS_FROM_EMAIL: "api-requests@example.com"
EDXAPP_API_DOCUMENTATION_URL: "http://course-catalog-api-guide.readthedocs.io/en/latest/"
EDXAPP_AUTH_DOCUMENTATION_URL: "http://course-catalog-api-guide.readthedocs.io/en/latest/authentication/index.html"
EDXAPP_API_COOKIE_URL: ""

# Settings for affiliate cookie tracking
EDXAPP_AFFILIATE_COOKIE_NAME: 'dev_affiliate_id'

EDXAPP_ENABLE_EDXNOTES: false

EDXAPP_ENABLE_CREDIT_ELIGIBILITY: false
EDXAPP_ENABLE_CREDIT_API: false

EDXAPP_CUSTOM_COURSES_EDX: false

EDXAPP_ENABLE_SYSADMIN_DASHBOARD: false

# Enable unrestricted access course staff to grade downloads
EDXAPP_ALLOW_COURSE_STAFF_GRADE_DOWNLOADS: true

# Enable Azure Media Service XBlock for embed video player
EDXAPP_ENABLE_AZURE_MEDIA_SERVICES_XBLOCK: false

# This is different from lms/envs/common.py
# We're turning it on in config because it needs a lot more configuration
# support, such as settings.DATABASES and initial database creation which is
# handled in the play.
EDXAPP_ENABLE_CSMH_EXTENDED: True
EDXAPP_ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES: True

EDXAPP_GIT_REPO_DIR: '/edx/var/edxapp/course_repos'
EDXAPP_GIT_REPO_EXPORT_DIR: '/edx/var/edxapp/export_course_repos'

EDXAPP_ONLOAD_BEACON_SAMPLE_RATE: 0.0

EDXAPP_FINANCIAL_REPORTS:
  BUCKET: !!null
  ROOT_PATH: "sandbox"
  STORAGE_TYPE: "localfs"

#Only address should have newlines
EDXAPP_PDF_RECEIPT_BILLING_ADDRESS: |
  Enter your receipt billing
  address here.

EDXAPP_PDF_RECEIPT_DISCLAIMER_TEXT: >
  ENTER YOUR RECEIPT DISCLAIMER TEXT HERE.

EDXAPP_PDF_RECEIPT_FOOTER_TEXT: >
  Enter your receipt footer text here.

EDXAPP_PDF_RECEIPT_TERMS_AND_CONDITIONS: >
  Enter your receipt terms and conditions here.

EDXAPP_PDF_RECEIPT_TAX_ID: "00-0000000"
EDXAPP_PDF_RECEIPT_TAX_ID_LABEL: "fake Tax ID"
EDXAPP_PDF_RECEIPT_COBRAND_LOGO_PATH: ""
EDXAPP_PDF_RECEIPT_LOGO_PATH: ""

EDXAPP_SOCIAL_AUTH_OAUTH_SECRETS: ""

# Replaced by oxa-tools/config/server-vars.yml
EDXAPP_FEATURES:
  AUTH_USE_OPENID_PROVIDER: true
  ENABLE_DISCUSSION_SERVICE: true
  ENABLE_INSTRUCTOR_ANALYTICS: false
  PREVIEW_LMS_BASE: "{{ EDXAPP_PREVIEW_LMS_BASE }}"
  ENABLE_GRADE_DOWNLOADS: true
  USE_CUSTOM_THEME: "{{ edxapp_use_custom_theme }}"
  ENABLE_MKTG_SITE: "{{ EDXAPP_ENABLE_MKTG_SITE }}"
  AUTOMATIC_AUTH_FOR_TESTING: "{{ EDXAPP_ENABLE_AUTO_AUTH }}"
  ENABLE_THIRD_PARTY_AUTH: "{{ EDXAPP_ENABLE_THIRD_PARTY_AUTH }}"
  ENABLE_VIDEO_UPLOAD_PIPELINE: false
  ENABLE_DISCUSSION_HOME_PANEL: true
  ENABLE_COMBINED_LOGIN_REGISTRATION: true
  ENABLE_CORS_HEADERS: false
  ENABLE_CROSS_DOMAIN_CSRF_COOKIE: false
  ENABLE_COUNTRY_ACCESS: false
  ENABLE_VIDEO_BEACON: false
  ENABLE_ONLOAD_BEACON: false
  ENABLE_EDXNOTES: "{{ EDXAPP_ENABLE_EDXNOTES }}"
  ENABLE_CREDIT_API: "{{ EDXAPP_ENABLE_CREDIT_API }}"
  ENABLE_CREDIT_ELIGIBILITY: "{{ EDXAPP_ENABLE_CREDIT_ELIGIBILITY }}"
  ENABLE_SPECIAL_EXAMS: false
  ENABLE_OAUTH2_PROVIDER: "{{ EDXAPP_ENABLE_OAUTH2_PROVIDER }}"
  ENABLE_SYSADMIN_DASHBOARD: "{{ EDXAPP_ENABLE_SYSADMIN_DASHBOARD }}"
  ENABLE_MOBILE_REST_API: "{{ EDXAPP_ENABLE_MOBILE_REST_API }}"
  CUSTOM_COURSES_EDX: "{{ EDXAPP_CUSTOM_COURSES_EDX }}"
  ENABLE_CSMH_EXTENDED: "{{ EDXAPP_ENABLE_CSMH_EXTENDED }}"
  ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES: "{{ EDXAPP_ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES }}"
  ALLOW_COURSE_STAFF_GRADE_DOWNLOADS: "{{EDXAPP_ALLOW_COURSE_STAFF_GRADE_DOWNLOADS}}"
  ENABLE_AZURE_MEDIA_SERVICE_XBLOCK: "{{EDXAPP_ENABLE_AZURE_MEDIA_SERVICES_XBLOCK}}"

EDXAPP_BOOK_URL: ""
# This needs to be set to localhost
# if xqueue is run on the same server
# as the lms (it's sent in the request)
EDXAPP_SITE_NAME: 'localhost'
EDXAPP_LMS_SITE_NAME: "{{ EDXAPP_SITE_NAME }}"
EDXAPP_CMS_SITE_NAME: 'localhost'
EDXAPP_PREVIEW_SITE_NAME: "preview.{{ EDXAPP_SITE_NAME }}"
EDXAPP_MEDIA_URL:  "/media"
EDXAPP_ANALYTICS_SERVER_URL:  ""
EDXAPP_FEEDBACK_SUBMISSION_EMAIL: ""
EDXAPP_CELERY_BROKER_HOSTNAME: ""
EDXAPP_LOGGING_ENV:  'sandbox'

EDXAPP_SYSLOG_SERVER: ""
EDXAPP_RABBIT_HOSTNAME: 'localhost'

EDXAPP_LMS_NGINX_PORT: 18000
EDXAPP_LMS_SSL_NGINX_PORT: 48000

EDXAPP_CMS_NGINX_PORT: 18010
EDXAPP_CMS_SSL_NGINX_PORT: 48010

# Multi site view live drop down related variable for cms
EDXAPP_ENABLE_MULTI_SITE_VIEWLIVE_DROPDOWN: false

# NGINX Rate limiting related vars
EDXAPP_ENABLE_RATE_LIMITING: false
EDXAPP_COURSES_REQUEST_RATE: '5r/s'
EDXAPP_COURSES_REQUEST_BURST_RATE: 10
EDXAPP_COURSES_USER_AGENT_BURST_RATE: 5
EDXAPP_RATE_LIMITED_USER_AGENTS: []

EDXAPP_LANG: 'en_US.UTF-8'
EDXAPP_LANGUAGE_CODE : 'en'
EDXAPP_TIME_ZONE: 'America/New_York'

EDXAPP_LMS_DOC_LINK_BASE_URL: 'https://edx.readthedocs.io/projects/open-edx-learner-guide'
EDXAPP_CMS_DOC_LINK_BASE_URL: 'https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course'

EDXAPP_TECH_SUPPORT_EMAIL: 'technical@example.com'
EDXAPP_CONTACT_EMAIL: 'info@example.com'
EDXAPP_BUGS_EMAIL: 'bugs@example.com'
EDXAPP_DEFAULT_FROM_EMAIL: 'registration@example.com'
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_BULK_EMAIL_LOG_SENT_EMAILS: false
EDXAPP_UNIVERSITY_EMAIL: 'university@example.com'
EDXAPP_PRESS_EMAIL: 'press@example.com'
EDXAPP_LMS_ROOT_URL: "{{ EDXAPP_LMS_BASE_SCHEME | default('https') }}://{{ EDXAPP_LMS_BASE }}"
EDXAPP_LMS_ISSUER: "{{ EDXAPP_LMS_ROOT_URL }}/oauth2"
EDXAPP_JWT_EXPIRATION: 30  # Number of seconds until expiration
EDXAPP_JWT_AUDIENCE: "lms-key"
EDXAPP_JWT_SECRET_KEY: "lms-secret"

EDXAPP_PLATFORM_TWITTER_ACCOUNT: '@YourPlatformTwitterAccount'
EDXAPP_PLATFORM_FACEBOOK_ACCOUNT: 'http://www.facebook.com/YourPlatformFacebookAccount'
EDXAPP_FACEBOOK_APP_ID: "FACEBOOK_APP_ID"
EDXAPP_FACEBOOK_APP_SECRET: "FACEBOOK_APP_SECRET"
EDXAPP_FACEBOOK_API_VERSION: "v2.1"

EDXAPP_CONTACT_MAILING_ADDRESS: 'SET-ME-PLEASE'

EDXAPP_SOCIAL_MEDIA_FOOTER_URLS: {}
EDXAPP_MOBILE_STORE_URLS: {}
EDXAPP_FOOTER_ORGANIZATION_IMAGE: "images/logo.png"

EDXAPP_ENV_EXTRA: {}
EDXAPP_AUTH_EXTRA: {}
EDXAPP_LMS_AUTH_EXTRA: "{{ EDXAPP_AUTH_EXTRA }}"
EDXAPP_CMS_AUTH_EXTRA: "{{ EDXAPP_AUTH_EXTRA }}"
EDXAPP_ENABLE_MKTG_SITE: false
EDXAPP_MKTG_URL_LINK_MAP: {}
EDXAPP_MKTG_URLS: {}
EDXAPP_SUPPORT_SITE_LINK: ''
EDXAPP_EDXMKTG_USER_INFO_COOKIE_NAME: "edx-user-info"
# Set this sets the url for static files
# Override this var to use a CDN
# Example: xxxxx.cloudfront.net/static/
EDXAPP_STATIC_URL_BASE: "/static/"

# Settings for Grade downloads
EDXAPP_GRADE_STORAGE_CLASS: 'django.core.files.storage.FileSystemStorage'
EDXAPP_GRADE_STORAGE_KWARGS:
  location: /tmp/edx-s3/grades

# Credit card processor
# These are the same defaults set in common.py
EDXAPP_CC_PROCESSOR_NAME: "CyberSource2"
EDXAPP_CC_PROCESSOR:
  CyberSource:
    SHARED_SECRET: ""
    MERCHANT_ID: ""
    SERIAL_NUMBER: ""
    ORDERPAGE_VERSION: '7'
    PURCHASE_ENDPOINT: ""
  CyberSource2:
    PURCHASE_ENDPOINT: ""
    SECRET_KEY: ""
    ACCESS_KEY: ""
    PROFILE_ID: ""

# does not affect verified students
EDXAPP_PAID_COURSE_REGISTRATION_CURRENCY: ['usd', '$']

# Configure paver tasks in edx-platform to skip Python/Ruby/Node installation
EDXAPP_NO_PREREQ_INSTALL: 1

# whether to setup the python codejail or not
EDXAPP_PYTHON_SANDBOX: true
# this next setting, if true, turns on actual sandbox enforcement.  If not true,
# it puts the sandbox in 'complain' mode, for reporting but not enforcement
EDXAPP_SANDBOX_ENFORCE: true

# Vars that are used when the automated role is "mixed-in" via the deploying play
# This data structure specifies all the users with access to run command remotely
# over SSH and the fully qualified command that they can run via sudo to the
# application user

EDXAPP_AUTOMATED_USERS:
  automated_user:
    sudo_commands:
      - command: "{{ edxapp_venv_bin }}/python {{ edxapp_code_dir }}/manage.py lms migrate --list --settings={{ edxapp_settings }}"
        sudo_user: "edxapp"
    authorized_keys:
      - "SSH authorized key"

EDXAPP_USE_GIT_IDENTITY: false
# Paste the contents of the git identity
# into this var
EDXAPP_GIT_IDENTITY: !!null

EDXAPP_UPDATE_STATIC_FILES_KEY: false
# Set this to true if you want to install the private pip
# requirements in the edx-platform repo.
# This will use EDXAPP_GIT_IDENTITY, EDXAPP_USE_GIT_IDENTITY
# must be set to true if EDXAPP_INSTALL_PRIVATE_REQUIREMENTS is
# set to true

EDXAPP_INSTALL_PRIVATE_REQUIREMENTS: false

# List of additional python packages that should be installed into the
# edxapp virtual environment.
# `name` (required), `version` (optional), and `extra_args` (optional)
# are supported and correspond to the options of ansible's pip module.
# Example:
# EDXAPP_EXTRA_REQUIREMENTS:
#   - name: mypackage
#     version: 1.0.1
#   - name: git+https://git.myproject.org/MyProject#egg=MyProject
EDXAPP_EXTRA_REQUIREMENTS: []

EDXAPP_GOOGLE_ANALYTICS_ACCOUNT: "None"

EDXAPP_OPTIMIZELY_PROJECT_ID: "None"
EDXAPP_TRACKING_SEGMENTIO_WEBHOOK_SECRET: ""
EDXAPP_CMS_SEGMENT_KEY: "None"
EDXAPP_LMS_SEGMENT_KEY: "None"
EDXAPP_EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST: []

EDXAPP_EDX_API_KEY: "PUT_YOUR_API_KEY_HERE"
# This is the default set in common.py
EDXAPP_VERIFY_STUDENT:
  DAYS_GOOD_FOR: 365
  EXPIRING_SOON_WINDOW: 28
EDXAPP_GOOGLE_ANALYTICS_LINKEDIN: ""
EDXAPP_CONTENTSTORE_ADDITIONAL_OPTS: {}
EDXAPP_BULK_EMAIL_EMAILS_PER_TASK: 500
# If using microsites this should point to the microsite repo
EDXAPP_MICROSITE_ROOT_DIR: "{{ edxapp_app_dir }}/edx-microsite"
# this dictionary defines what microsites are configured
EDXAPP_MICROSITE_CONFIGURATION: {}
# Instructor code that will not be run in the code sandbox
EDXAPP_COURSES_WITH_UNSAFE_CODE: []
EDXAPP_SESSION_COOKIE_DOMAIN: ""
EDXAPP_SESSION_COOKIE_NAME: "sessionid"

# XML Course related flags
EDXAPP_XML_FROM_GIT: false
EDXAPP_XML_S3_BUCKET: !!null
EDXAPP_XML_S3_KEY: !!null

EDXAPP_NEWRELIC_LMS_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-edxapp-lms"
EDXAPP_NEWRELIC_CMS_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-edxapp-cms"
EDXAPP_NEWRELIC_WORKERS_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-edxapp-workers"

EDXAPP_ORA2_FILE_PREFIX: '{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}/ora2'
EDXAPP_FILE_UPLOAD_STORAGE_BUCKET_NAME: '{{ EDXAPP_AWS_STORAGE_BUCKET_NAME }}'
EDXAPP_FILE_UPLOAD_STORAGE_PREFIX: 'submissions_attachments'

EDXAPP_CODE_JAIL_LIMITS:
  # Limit the memory of the jailed process to something high but not
  # infinite (512MiB in bytes)
  VMEM: 536870912
  # Time in seconds that the jailed process has to run.
  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
  PROXY: 0

EDXAPP_VIRTUAL_UNIVERSITIES: []
# Set the number of workers explicitly for lms and cms
# Should be set to
# EDXAPP_WORKERS:
#   lms: <num workers>
#   cms: <num workers>
EDXAPP_WORKERS: !!null
EDXAPP_ANALYTICS_DATA_TOKEN: ""
EDXAPP_ANALYTICS_DATA_URL: ""
# Dashboard URL, assumes that the insights role is installed locally
EDXAPP_ANALYTICS_DASHBOARD_URL: ""

EDXAPP_REGISTRATION_EXTRA_FIELDS:
  level_of_education: "optional"
  gender: "optional"
  year_of_birth: "optional"
  mailing_address: "optional"
  goals: "optional"
  honor_code: "required"
  city: "hidden"
  country: "hidden"

EDXAPP_CELERY_WORKERS:
  - queue: low
    service_variant: cms
    concurrency: 1
    monitor: True
  - queue: default
    service_variant: cms
    concurrency: 1
    monitor: True
  - queue: high
    service_variant: cms
    concurrency: 1
    monitor: True
  - queue: low
    service_variant: lms
    concurrency: 1
    monitor: True
  - queue: default
    service_variant: lms
    concurrency: 1
    monitor: True
  - queue: high
    service_variant: lms
    concurrency: 1
    monitor: True
  - queue: high_mem
    service_variant: lms
    concurrency: 1
    monitor: False
    max_tasks_per_child: 1
EDXAPP_RECALCULATE_GRADES_ROUTING_KEY: 'edx.lms.core.default'
EDXAPP_LMS_CELERY_QUEUES: "{{ edxapp_workers|selectattr('service_variant', 'equalto', 'lms')|map(attribute='queue')|map('regex_replace', '(.*)', 'edx.lms.core.\\1')|list }}"
EDXAPP_CMS_CELERY_QUEUES: "{{ edxapp_workers|selectattr('service_variant', 'equalto', 'cms')|map(attribute='queue')|map('regex_replace', '(.*)', 'edx.cms.core.\\1')|list }}"

EDXAPP_DEFAULT_CACHE_VERSION: "1"
EDXAPP_OAUTH_ENFORCE_SECURE: True
EDXAPP_OAUTH_EXPIRE_CONFIDENTIAL_CLIENT_DAYS: 365
EDXAPP_OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS: 30

# Directory for edxapp application configuration files
EDXAPP_CFG_DIR: "{{ COMMON_CFG_DIR }}/edxapp"
EDXAPP_DEPRECATED_ADVANCED_COMPONENT_TYPES: []

# Video Pipeline Settings
EDXAPP_VIDEO_UPLOAD_PIPELINE:
  BUCKET: ''
  ROOT_PATH: ''

EDXAPP_CORS_ORIGIN_WHITELIST: []
EDXAPP_CORS_ORIGIN_ALLOW_ALL: false
EDXAPP_CROSS_DOMAIN_CSRF_COOKIE_DOMAIN: ""
EDXAPP_CROSS_DOMAIN_CSRF_COOKIE_NAME: ""
EDXAPP_CSRF_COOKIE_SECURE: false

# Video Beacon Settings
CDN_VIDEO_URLS: {}
PERFORMANCE_GRAPHITE_URL: 'SetPerformanceGraphiteHostName'

# E-Commerce Related Settings
EDXAPP_ECOMMERCE_PUBLIC_URL_ROOT: "http://localhost:8002"
EDXAPP_ECOMMERCE_API_URL: "http://localhost:8002/api/v2"
# TODO (CCB) Remove this after all references in edx/edx-platform have been removed.
EDXAPP_ECOMMERCE_API_SIGNING_KEY: "{{ EDXAPP_JWT_SECRET_KEY }}"
EDXAPP_COURSE_CATALOG_API_URL: "http://localhost:8008/api/v1"

# Mailchimp Settings
EDXAPP_MAILCHIMP_NEW_USER_LIST_ID: null

# Social Sharing Related Settings
EDXAPP_SOCIAL_SHARING_SETTINGS:
  CUSTOM_COURSE_URLS: false
  DASHBOARD_FACEBOOK: false
  CERTIFICATE_FACEBOOK: false
  CERTIFICATE_TWITTER: false
  DASHBOARD_TWITTER: false

#To use AWS S3 as your backend, you need different kwargs:
# EDXAPP_PROFILE_IMAGE_BACKEND_CONFIG:
#   class: storages.backends.s3boto.S3BotoStorage
#   options:
#     location: /path/to/images
#     bucket: mybucket
#     custom_domain: mybucket.s3.amazonaws.com
#     access_key: XXXAWS_ACCESS_KEYXXX
#     secret_key: XXXAWS_SECRETY_KEYXXX
#     headers:
#       Cache-Control: max-age-{{ EDXAPP_PROFILE_IMAGE_MAX_AGE }}
#NB: access_key and secret_key are unneccessary if you use IAM roles
#NB2: custom_domain is REQUIRED. Otherwise, boto will generate a
# temporary URL whenever asked for the URL of a specific file.
EDXAPP_PROFILE_IMAGE_BACKEND:
  class: storages.backends.overwrite.OverwriteStorage
  options:
    location: "{{ edxapp_media_dir }}/profile-images/"
    base_url: "{{ EDXAPP_MEDIA_URL }}/profile-images/"

EDXAPP_PROFILE_IMAGE_MAX_AGE: 31536000

# used to salt hashed usernames for profile image filenames
EDXAPP_PROFILE_IMAGE_SECRET_KEY: placeholder_secret_key

# In bytes
EDXAPP_PROFILE_IMAGE_MAX_BYTES: 1048576
EDXAPP_PROFILE_IMAGE_MIN_BYTES: 100

EDXAPP_PARSE_KEYS: {}

# In a production environment when using separate clusters, you'll
# want to route requests differently from the LMS (internal api) and
# from JS (public API)
EDXAPP_EDXNOTES_PUBLIC_API: http://localhost:18120/api/v1
EDXAPP_EDXNOTES_INTERNAL_API: http://localhost:18120/api/v1

EDXAPP_XBLOCK_SETTINGS: {}

# Secret keys shared with credit providers.
# Used to digitally sign credit requests (us --> provider)
# and validate responses (provider --> us).
# Each key in the dictionary is a credit provider ID, and
# the value is the 32-character key.
EDXAPP_CREDIT_PROVIDER_SECRET_KEYS: {}

# Proctoring configuration (redirct URLs and keys shared between systems)
EDXAPP_PROCTORING_SETTINGS: {}
EDXAPP_PROCTORING_BACKEND_PROVIDER:
  class: 'edx_proctoring.backends.null.NullBackendProvider'
  options: {}

# Comprehensive Theming
# Deprecated, maintained for backward compatibility
EDXAPP_COMPREHENSIVE_THEME_DIR: ""

# list of paths to the comprehensive theme directories
EDXAPP_COMPREHENSIVE_THEME_DIRS:
  - "{{ EDXAPP_COMPREHENSIVE_THEME_DIR }}"

# list of paths to the comprehensive theme locale directories
EDXAPP_COMPREHENSIVE_THEME_LOCALE_PATHS: []

# Name of the default site theme
EDXAPP_DEFAULT_SITE_THEME: ""
EDXAPP_ENABLE_COMPREHENSIVE_THEMING: false

# Git repo for the comprehensive theme (if using a comprehensive theme
# other than the ones bundled with edx/platform)
EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO: ""
# Git branch, tag, or revision to check out from
# EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO
EDXAPP_COMPREHENSIVE_THEME_VERSION: ""

# SAML KEYS
EDXAPP_SOCIAL_AUTH_SAML_SP_PRIVATE_KEY: ''
EDXAPP_SOCIAL_AUTH_SAML_SP_PUBLIC_CERT: ''

# Session cookie setting
# Only set this to true for client side profiling, never for production
EDXAPP_SESSION_SAVE_EVERY_REQUEST: false

EDXAPP_SESSION_COOKIE_SECURE: false

EDXAPP_LMS_ALLOWED_HOSTS: ["*", "{{ EDXAPP_LMS_SITE_NAME }}", "{{ EDXAPP_PREVIEW_SITE_NAME }}"]
EDXAPP_CMS_ALLOWED_HOSTS: ["*", "{{ EDXAPP_CMS_SITE_NAME }}"]


#-------- Everything below this line is internal to the role ------------

#Use YAML references (& and *) and hash merge <<: to factor out shared settings
#see http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/

edxapp_data_dir: "{{ COMMON_DATA_DIR }}/edxapp"
edxapp_app_dir: "{{ COMMON_APP_DIR }}/edxapp"
edxapp_log_dir: "{{ COMMON_LOG_DIR }}/edxapp"
edxapp_venvs_dir: "{{ edxapp_app_dir }}/venvs"
edxapp_venv_dir: "{{ edxapp_venvs_dir }}/edxapp"
edxapp_venv_bin: "{{ edxapp_venv_dir }}/bin"
edxapp_nodeenv_dir: "{{ edxapp_app_dir }}/nodeenvs/edxapp"
edxapp_nodeenv_bin: "{{ edxapp_nodeenv_dir }}/bin"
edxapp_settings: '{{ EDXAPP_SETTINGS }}'
edxapp_node_version: "{{ common_node_version }}"
# This is where node installs modules, not node itself
edxapp_node_bin: "{{ edxapp_code_dir }}/node_modules/.bin"
edxapp_user: edxapp
edxapp_deploy_path: "{{ edxapp_venv_bin }}:{{ edxapp_code_dir }}/bin:{{ edxapp_node_bin }}:{{ edxapp_nodeenv_bin }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
edxapp_staticfile_dir: "{{ edxapp_data_dir }}/staticfiles"
edxapp_media_dir: "{{ edxapp_data_dir }}/media"
edxapp_course_static_dir: "{{ edxapp_data_dir }}/course_static"
edxapp_course_data_dir: "{{ edxapp_data_dir }}/data"
edxapp_upload_dir: "{{ edxapp_data_dir }}/uploads"
edxapp_theme_dir: "{{ edxapp_data_dir }}/themes"
edxapp_git_identity: "{{ edxapp_app_dir }}/edxapp-git-identity"
edxapp_git_ssh: "/tmp/edxapp_git_ssh.sh"

# TODO: This can be removed once VPC-122 is resolved
edxapp_legacy_course_data_dir: "{{ edxapp_app_dir }}/data"

edxapp_workers: "{{ EDXAPP_CELERY_WORKERS }}"
EDXAPP_WORKER_DEFAULT_STOPWAITSECS: 432000

# setup for python codejail
edxapp_sandbox_venv_dir:  '{{ edxapp_venvs_dir }}/edxapp-sandbox'
edxapp_sandbox_user: 'sandbox'  # I think something about the codejail requires hardcoding this to sandbox:sandbox

# apparmor command
edxapp_aa_command: "{% if EDXAPP_SANDBOX_ENFORCE %}aa-enforce{% else %}aa-complain{% endif %}"

# TODO: old style variable syntax is necessary
# for lists and dictionaries
edxapp_helper_scripts:
    - edxapp-migrate
    - edxapp-runserver
    - edxapp-update-assets
    - edxapp-shell

edxapp_environment:
  LANG: "{{ EDXAPP_LANG }}"
  NO_PREREQ_INSTALL: "{{ EDXAPP_NO_PREREQ_INSTALL }}"
  SKIP_WS_MIGRATIONS: 1
  PATH: "{{ edxapp_deploy_path }}"
  # the settings module for edxapp, DJANGO_SETTINGS_MODULE
  # should be set to {{SERVICE_VARIANT}}.{{EDXAPP_SETTINGS}}
  # where SERVICE_VARIANT is lms or cms
  EDX_PLATFORM_SETTINGS: "{{ EDXAPP_SETTINGS }}"
  # Current set to the app dir for json config, this should
  # be updated to /edx/etc/edxapp when the switch to
  # yaml based configs is complete
  CONFIG_ROOT: "{{ edxapp_app_dir }}"

edxapp_generic_doc_store_config: &edxapp_generic_default_docstore
  db: "{{ EDXAPP_MONGO_DB_NAME }}"
  host: "{{ EDXAPP_MONGO_HOSTS }}"
  password: "{{ EDXAPP_MONGO_PASSWORD }}"
  port: "{{ EDXAPP_MONGO_PORT }}"
  user: "{{ EDXAPP_MONGO_USER }}"
  collection:  'modulestore'
  ssl: "{{ EDXAPP_MONGO_USE_SSL }}"
  # https://api.mongodb.com/python/2.9.1/api/pymongo/mongo_client.html#module-pymongo.mongo_client
  socketTimeoutMS: 3000 # default is never timeout while the connection is open, this means it needs to explicitly close raising pymongo.errors.NetworkTimeout
  connectTimeoutMS: 2000 # default is 20000, I believe raises pymongo.errors.ConnectionFailure
  # Not setting waitQueueTimeoutMS and waitQueueMultiple since pymongo defaults to nobody being allowed to wait


EDXAPP_LMS_DRAFT_DOC_STORE_CONFIG:
  <<: *edxapp_generic_default_docstore

EDXAPP_LMS_SPLIT_DOC_STORE_CONFIG:
  <<: *edxapp_generic_default_docstore

EDXAPP_CMS_DOC_STORE_CONFIG:
  <<: *edxapp_generic_default_docstore

edxapp_databases:
# edxapp's edxapp-migrate scripts and the edxapp_migrate play
# will ensure that any DB not named read_replica will be migrated
# for both the lms and cms.
  read_replica:
    ENGINE: 'django.db.backends.mysql'
    NAME: "{{ EDXAPP_MYSQL_REPLICA_DB_NAME }}"
    USER: "{{ EDXAPP_MYSQL_REPLICA_USER }}"
    PASSWORD: "{{ EDXAPP_MYSQL_REPLICA_PASSWORD }}"
    HOST: "{{ EDXAPP_MYSQL_REPLICA_HOST }}"
    PORT: "{{ EDXAPP_MYSQL_REPLICA_PORT }}"
  default:
    ENGINE: 'django.db.backends.mysql'
    NAME: "{{ EDXAPP_MYSQL_DB_NAME }}"
    USER: "{{ EDXAPP_MYSQL_USER }}"
    PASSWORD: "{{ EDXAPP_MYSQL_PASSWORD }}"
    HOST: "{{ EDXAPP_MYSQL_HOST }}"
    PORT: "{{ EDXAPP_MYSQL_PORT }}"
    ATOMIC_REQUESTS: True
  student_module_history:
    ENGINE: 'django.db.backends.mysql'
    NAME: "{{ EDXAPP_MYSQL_CSMH_DB_NAME }}"
    USER: "{{ EDXAPP_MYSQL_CSMH_USER }}"
    PASSWORD: "{{ EDXAPP_MYSQL_CSMH_PASSWORD }}"
    HOST: "{{ EDXAPP_MYSQL_CSMH_HOST }}"
    PORT: "{{ EDXAPP_MYSQL_CSMH_PORT }}"

edxapp_generic_auth_config:  &edxapp_generic_auth
  EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST: "{{ EDXAPP_EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST }}"
  ECOMMERCE_API_SIGNING_KEY: "{{ EDXAPP_ECOMMERCE_API_SIGNING_KEY }}"
  ANALYTICS_DATA_TOKEN: "{{ EDXAPP_ANALYTICS_DATA_TOKEN }}"
  DEFAULT_FILE_STORAGE:  "{{ EDXAPP_DEFAULT_FILE_STORAGE }}"
  AWS_ACCESS_KEY_ID:  "{{ EDXAPP_AWS_ACCESS_KEY_ID }}"
  AWS_SECRET_ACCESS_KEY: "{{ EDXAPP_AWS_SECRET_ACCESS_KEY }}"
  AZURE_ACCOUNT_NAME: "{{ EDXAPP_AZURE_ACCOUNT_NAME }}"
  AZURE_ACCOUNT_KEY: "{{ EDXAPP_AZURE_ACCOUNT_KEY }}"
  AZURE_CONTAINER: "{{ EDXAPP_AZURE_CONTAINER }}"
  AWS_QUERYSTRING_AUTH: "{{ EDXAPP_AWS_QUERYSTRING_AUTH }}"
  AWS_STORAGE_BUCKET_NAME: "{{ EDXAPP_AWS_STORAGE_BUCKET_NAME }}"
  AWS_S3_CUSTOM_DOMAIN: "{{ EDXAPP_AWS_S3_CUSTOM_DOMAIN }}"
  SWIFT_USERNAME: "{{ EDXAPP_SWIFT_USERNAME }}"
  SWIFT_KEY: "{{ EDXAPP_SWIFT_KEY }}"
  SWIFT_TENANT_ID: "{{ EDXAPP_SWIFT_TENANT_ID }}"
  SWIFT_TENANT_NAME: "{{ EDXAPP_SWIFT_TENANT_NAME }}"
  SWIFT_AUTH_URL: "{{ EDXAPP_SWIFT_AUTH_URL }}"
  SWIFT_AUTH_VERSION: "{{ EDXAPP_SWIFT_AUTH_VERSION }}"
  SWIFT_REGION_NAME: "{{ EDXAPP_SWIFT_REGION_NAME }}"
  SWIFT_USE_TEMP_URLS: "{{ EDXAPP_SWIFT_USE_TEMP_URLS }}"
  SWIFT_TEMP_URL_KEY: "{{ EDXAPP_SWIFT_TEMP_URL_KEY }}"
  SWIFT_TEMP_URL_DURATION: "{{ EDXAPP_SWIFT_TEMP_URL_DURATION }}"
  SESSION_INACTIVITY_TIMEOUT_IN_SECONDS: "{{ EDXAPP_SESSION_INACTIVITY_TIMEOUT_IN_SECONDS }}"
  SECRET_KEY:  "{{ EDXAPP_EDXAPP_SECRET_KEY }}"
  DOC_STORE_CONFIG: "{{ edxapp_generic_doc_store_config }}"
  XQUEUE_INTERFACE:
    basic_auth: "{{ EDXAPP_XQUEUE_BASIC_AUTH }}"
    django_auth: "{{ EDXAPP_XQUEUE_DJANGO_AUTH }}"
    url: "{{ EDXAPP_XQUEUE_URL }}"
  CONTENTSTORE:
    ENGINE:  'xmodule.contentstore.mongo.MongoContentStore'
    #
    # connection strings are duplicated temporarily for
    # backward compatibility
    #
    OPTIONS:
      db: "{{ EDXAPP_MONGO_DB_NAME }}"
      host: "{{ EDXAPP_MONGO_HOSTS }}"
      password: "{{ EDXAPP_MONGO_PASSWORD }}"
      port: "{{ EDXAPP_MONGO_PORT }}"
      user: "{{ EDXAPP_MONGO_USER }}"
      ssl: "{{ EDXAPP_MONGO_USE_SSL }}"
    ADDITIONAL_OPTIONS: "{{ EDXAPP_CONTENTSTORE_ADDITIONAL_OPTS }}"
    DOC_STORE_CONFIG: *edxapp_generic_default_docstore
  DATABASES: "{{ edxapp_databases }}"
  ANALYTICS_API_KEY:  "{{ EDXAPP_ANALYTICS_API_KEY }}"
  EMAIL_HOST_USER: "{{ EDXAPP_EMAIL_HOST_USER }}"
  EMAIL_HOST_PASSWORD: "{{ EDXAPP_EMAIL_HOST_PASSWORD }}"
  RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS: "{{ EDXAPP_RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS }}"
  RETRY_ACTIVATION_EMAIL_TIMEOUT: "{{ EDXAPP_RETRY_ACTIVATION_EMAIL_TIMEOUT }}"
  YOUTUBE_API_KEY: "{{ EDXAPP_YOUTUBE_API_KEY }}"
  ZENDESK_USER: "{{ EDXAPP_ZENDESK_USER }}"
  ZENDESK_API_KEY: "{{ EDXAPP_ZENDESK_API_KEY }}"
  CELERY_BROKER_USER: "{{ EDXAPP_CELERY_USER }}"
  CELERY_BROKER_PASSWORD: "{{ EDXAPP_CELERY_PASSWORD }}"
  GOOGLE_ANALYTICS_ACCOUNT: "{{ EDXAPP_GOOGLE_ANALYTICS_ACCOUNT }}"
  DJFS: "{{ EDXAPP_DJFS }}"
  CREDIT_PROVIDER_SECRET_KEYS: "{{ EDXAPP_CREDIT_PROVIDER_SECRET_KEYS }}"
  SOCIAL_AUTH_SAML_SP_PRIVATE_KEY: "{{ EDXAPP_SOCIAL_AUTH_SAML_SP_PRIVATE_KEY }}"
  SOCIAL_AUTH_SAML_SP_PUBLIC_CERT: "{{ EDXAPP_SOCIAL_AUTH_SAML_SP_PUBLIC_CERT }}"
  FACEBOOK_APP_ID: "{{ EDXAPP_FACEBOOK_APP_ID }}"
  FACEBOOK_APP_SECRET: "{{ EDXAPP_FACEBOOK_APP_SECRET }}"
  FACEBOOK_API_VERSION: "{{ EDXAPP_FACEBOOK_API_VERSION }}"

generic_cache_config: &default_generic_cache
  BACKEND:  'django.core.cache.backends.memcached.MemcachedCache'
  KEY_FUNCTION:  'util.memcache.safe_key'

generic_env_config:  &edxapp_generic_env
  COURSE_CATALOG_VISIBILITY_PERMISSION: "{{ EDXAPP_COURSE_CATALOG_VISIBILITY_PERMISSION }}"
  COURSE_ABOUT_VISIBILITY_PERMISSION: "{{ EDXAPP_COURSE_ABOUT_VISIBILITY_PERMISSION }}"
  COUNTRIES_OVERRIDE: "{{ EDXAPP_COUNTRIES_OVERRIDE }}"
  ALL_LANGUAGES_OVERRIDE: "{{ EDXAPP_ALL_LANGUAGES_OVERRIDE }}"
  PASSWORD_MIN_LENGTH: "{{ EDXAPP_PASSWORD_MIN_LENGTH }}"
  PASSWORD_MAX_LENGTH: "{{ EDXAPP_PASSWORD_MAX_LENGTH }}"
  PASSWORD_COMPLEXITY: "{{ EDXAPP_PASSWORD_COMPLEXITY }}"
  ENFORCE_PASSWORD_POLICY: "{{ EDXAPP_ENFORCE_PASSWORD_POLICY }}"
  ECOMMERCE_PUBLIC_URL_ROOT: "{{ EDXAPP_ECOMMERCE_PUBLIC_URL_ROOT }}"
  ECOMMERCE_API_URL: "{{ EDXAPP_ECOMMERCE_API_URL }}"
  COURSE_CATALOG_API_URL: "{{ EDXAPP_COURSE_CATALOG_API_URL }}"
  FINANCIAL_REPORTS: "{{ EDXAPP_FINANCIAL_REPORTS }}"
  ONLOAD_BEACON_SAMPLE_RATE: "{{ EDXAPP_ONLOAD_BEACON_SAMPLE_RATE }}"
  CORS_ORIGIN_WHITELIST: "{{ EDXAPP_CORS_ORIGIN_WHITELIST }}"
  CORS_ORIGIN_ALLOW_ALL: "{{ EDXAPP_CORS_ORIGIN_ALLOW_ALL }}"
  CROSS_DOMAIN_CSRF_COOKIE_DOMAIN: "{{ EDXAPP_CROSS_DOMAIN_CSRF_COOKIE_DOMAIN }}"
  CROSS_DOMAIN_CSRF_COOKIE_NAME: "{{ EDXAPP_CROSS_DOMAIN_CSRF_COOKIE_NAME }}"
  CSRF_COOKIE_SECURE: "{{ EDXAPP_CSRF_COOKIE_SECURE  }}"
  VIDEO_UPLOAD_PIPELINE: "{{ EDXAPP_VIDEO_UPLOAD_PIPELINE }}"
  DEPRECATED_ADVANCED_COMPONENT_TYPES: "{{ EDXAPP_DEPRECATED_ADVANCED_COMPONENT_TYPES }}"
  OAUTH_OIDC_ISSUER: "{{ EDXAPP_LMS_ISSUER }}"
  XBLOCK_FS_STORAGE_BUCKET: "{{ EDXAPP_XBLOCK_FS_STORAGE_BUCKET }}"
  XBLOCK_FS_STORAGE_PREFIX: "{{ EDXAPP_XBLOCK_FS_STORAGE_PREFIX }}"
  X_FRAME_OPTIONS: "{{ EDXAPP_X_FRAME_OPTIONS }}"
  ANALYTICS_DATA_URL: "{{ EDXAPP_ANALYTICS_DATA_URL }}"
  ANALYTICS_DASHBOARD_URL: '{{ EDXAPP_ANALYTICS_DASHBOARD_URL }}'
  API_COOKIE_URL: "{{ EDXAPP_API_COOKIE_URL }}"
  CELERY_BROKER_VHOST: "{{ EDXAPP_CELERY_BROKER_VHOST }}"
  CELERY_BROKER_USE_SSL: "{{ EDXAPP_CELERY_BROKER_USE_SSL }}"
  PAYMENT_SUPPORT_EMAIL: "{{ EDXAPP_PAYMENT_SUPPORT_EMAIL }}"
  ZENDESK_URL: "{{ EDXAPP_ZENDESK_URL }}"
  ZENDESK_CUSTOM_FIELDS: "{{ EDXAPP_ZENDESK_CUSTOM_FIELDS }}"
  COURSES_WITH_UNSAFE_CODE: "{{ EDXAPP_COURSES_WITH_UNSAFE_CODE }}"
  BULK_EMAIL_EMAILS_PER_TASK: "{{ EDXAPP_BULK_EMAIL_EMAILS_PER_TASK }}"
  MICROSITE_ROOT_DIR: "{{ EDXAPP_MICROSITE_ROOT_DIR }}"
  MICROSITE_CONFIGURATION: "{{ EDXAPP_MICROSITE_CONFIGURATION }}"
  DEFAULT_FILE_STORAGE:  "{{ EDXAPP_DEFAULT_FILE_STORAGE }}"
  GRADES_DOWNLOAD:
    STORAGE_CLASS: "{{ EDXAPP_GRADE_STORAGE_CLASS | default(None) }}"
    STORAGE_KWARGS: "{{ EDXAPP_GRADE_STORAGE_KWARGS | default(None) }}"
    STORAGE_TYPE: "{{ EDXAPP_GRADE_STORAGE_TYPE | default(None) }}"
    BUCKET: "{{ EDXAPP_GRADE_BUCKET | default(None) }}"
    ROOT_PATH: "{{ EDXAPP_GRADE_ROOT_PATH | default(None) }}"
    CONTAINER: "{{ EDXAPP_GRADE_STORAGE_CONTAINER | default(None) }}"
  STATIC_URL_BASE: "{{ EDXAPP_STATIC_URL_BASE }}"
  STATIC_ROOT_BASE: "{{ edxapp_staticfile_dir }}"
  LMS_BASE: "{{ EDXAPP_LMS_BASE }}"
  CMS_BASE: "{{ EDXAPP_CMS_BASE }}"
  LMS_ROOT_URL: "{{ EDXAPP_LMS_ROOT_URL }}"
  BOOK_URL:  "{{ EDXAPP_BOOK_URL }}"
  PARTNER_SUPPORT_EMAIL: "{{ EDXAPP_PARTNER_SUPPORT_EMAIL }}"
  PLATFORM_NAME: "{{ EDXAPP_PLATFORM_NAME }}"
  STUDIO_NAME: "{{ EDXAPP_STUDIO_NAME }}"
  STUDIO_SHORT_NAME: "{{ EDXAPP_STUDIO_SHORT_NAME }}"
  CERT_QUEUE:  'certificates'
  LOCAL_LOGLEVEL: "{{ EDXAPP_LOG_LEVEL }}"
  # default email backed set to local SMTP
  EMAIL_BACKEND: "{{ EDXAPP_EMAIL_BACKEND }}"
  EMAIL_HOST: "{{ EDXAPP_EMAIL_HOST }}"
  EMAIL_PORT: "{{ EDXAPP_EMAIL_PORT }}"
  EMAIL_USE_TLS: "{{ EDXAPP_EMAIL_USE_TLS }}"
  AWS_SES_REGION_NAME: "{{ EDXAPP_AWS_SES_REGION_NAME }}"
  AWS_SES_REGION_ENDPOINT: "{{ EDXAPP_AWS_SES_REGION_ENDPOINT }}"
  FEATURES: "{{ EDXAPP_FEATURES }}"
  WIKI_ENABLED: true
  SYSLOG_SERVER:  "{{ EDXAPP_SYSLOG_SERVER }}"
  LOG_DIR:  "{{ COMMON_DATA_DIR }}/logs/edx"
  JWT_ISSUER: "{{ EDXAPP_LMS_ISSUER }}"
  JWT_EXPIRATION: '{{ EDXAPP_JWT_EXPIRATION }}'
  JWT_AUTH:
    JWT_ISSUER: "{{ EDXAPP_LMS_ISSUER }}"
    JWT_AUDIENCE: "{{ EDXAPP_JWT_AUDIENCE }}"
    JWT_SECRET_KEY: "{{ EDXAPP_JWT_SECRET_KEY }}"

  #must end in slash (https://docs.djangoproject.com/en/1.4/ref/settings/#media-url)
  MEDIA_URL:  "{{ EDXAPP_MEDIA_URL }}/"
  MEDIA_ROOT: "{{ edxapp_media_dir }}/"

  ANALYTICS_SERVER_URL:  "{{ EDXAPP_ANALYTICS_SERVER_URL }}"
  FEEDBACK_SUBMISSION_EMAIL: "{{ EDXAPP_FEEDBACK_SUBMISSION_EMAIL }}"
  TIME_ZONE: "{{ EDXAPP_TIME_ZONE }}"
  LANGUAGE_CODE: "{{ EDXAPP_LANGUAGE_CODE }}"
  MKTG_URL_LINK_MAP: "{{ EDXAPP_MKTG_URL_LINK_MAP }}"
  MKTG_URLS: "{{ EDXAPP_MKTG_URLS }}"
  SUPPORT_SITE_LINK: "{{ EDXAPP_SUPPORT_SITE_LINK }}"
  CDN_VIDEO_URLS: "{{ CDN_VIDEO_URLS }}"
  PERFORMANCE_GRAPHITE_URL: "{{ PERFORMANCE_GRAPHITE_URL }}"

  # repo root for courses
  GITHUB_REPO_ROOT: "{{ edxapp_course_data_dir }}"
  CACHES:
    default:
      <<: *default_generic_cache
      KEY_PREFIX: 'default'
      LOCATION: "{{ EDXAPP_MEMCACHE }}"
      VERSION: "{{ EDXAPP_DEFAULT_CACHE_VERSION }}"
    general:
      <<: *default_generic_cache
      KEY_PREFIX:  'general'
      LOCATION: "{{ EDXAPP_MEMCACHE }}"
    mongo_metadata_inheritance:
      <<: *default_generic_cache
      KEY_PREFIX:  'mongo_metadata_inheritance'
      TIMEOUT: 300
      LOCATION: "{{ EDXAPP_MEMCACHE }}"
    staticfiles:
      <<: *default_generic_cache
      KEY_PREFIX: "{{ ansible_hostname|default('staticfiles') }}_general"
      LOCATION: "{{ EDXAPP_MEMCACHE }}"
    configuration:
      <<: *default_generic_cache
      KEY_PREFIX: "{{ ansible_hostname|default('configuration') }}"
      LOCATION: "{{ EDXAPP_MEMCACHE }}"
    celery:
      <<: *default_generic_cache
      KEY_PREFIX:  'celery'
      LOCATION: "{{ EDXAPP_MEMCACHE }}"
      TIMEOUT: "7200"
    course_structure_cache:
      <<: *default_generic_cache
      KEY_PREFIX: 'course_structure'
      LOCATION: "{{ EDXAPP_CACHE_COURSE_STRUCTURE_MEMCACHE }}"
      # Default to two hours
      TIMEOUT: "7200"
  CELERY_BROKER_TRANSPORT: 'amqp'
  CELERY_BROKER_HOSTNAME: "{{ EDXAPP_RABBIT_HOSTNAME }}"
  COMMENTS_SERVICE_URL: "{{ EDXAPP_COMMENTS_SERVICE_URL }}"
  LOGGING_ENV: "{{ EDXAPP_LOGGING_ENV }}"
  SESSION_COOKIE_DOMAIN:  "{{ EDXAPP_SESSION_COOKIE_DOMAIN }}"
  SESSION_COOKIE_NAME:  "{{ EDXAPP_SESSION_COOKIE_NAME }}"
  COMMENTS_SERVICE_KEY: "{{ EDXAPP_COMMENTS_SERVICE_KEY }}"
  THEME_NAME: "{{ edxapp_theme_name }}"
  TECH_SUPPORT_EMAIL: "{{ EDXAPP_TECH_SUPPORT_EMAIL }}"
  CONTACT_EMAIL: "{{ EDXAPP_CONTACT_EMAIL }}"
  BUGS_EMAIL: "{{ EDXAPP_BUGS_EMAIL }}"
  DEFAULT_FROM_EMAIL: "{{ EDXAPP_DEFAULT_FROM_EMAIL }}"
  DEFAULT_FEEDBACK_EMAIL: "{{ EDXAPP_DEFAULT_FEEDBACK_EMAIL }}"
  SERVER_EMAIL: "{{ EDXAPP_DEFAULT_SERVER_EMAIL }}"
  BULK_EMAIL_DEFAULT_FROM_EMAIL: "{{ EDXAPP_BULK_EMAIL_DEFAULT_FROM_EMAIL }}"
  BULK_EMAIL_LOG_SENT_EMAILS: "{{ EDXAPP_BULK_EMAIL_LOG_SENT_EMAILS }}"
  CAS_SERVER_URL: "{{ EDXAPP_CAS_SERVER_URL }}"
  CAS_EXTRA_LOGIN_PARAMS: "{{ EDXAPP_CAS_EXTRA_LOGIN_PARAMS }}"
  CAS_ATTRIBUTE_CALLBACK: "{{ EDXAPP_CAS_ATTRIBUTE_CALLBACK }}"
  UNIVERSITY_EMAIL: "{{ EDXAPP_UNIVERSITY_EMAIL }}"
  PRESS_EMAIL: "{{ EDXAPP_PRESS_EMAIL }}"
  SOCIAL_MEDIA_FOOTER_URLS: "{{ EDXAPP_SOCIAL_MEDIA_FOOTER_URLS }}"
  MOBILE_STORE_URLS: "{{ EDXAPP_MOBILE_STORE_URLS }}"
  FOOTER_ORGANIZATION_IMAGE: "{{ EDXAPP_FOOTER_ORGANIZATION_IMAGE }}"
  ORA2_FILE_PREFIX: "{{ EDXAPP_ORA2_FILE_PREFIX }}"
  FILE_UPLOAD_STORAGE_BUCKET_NAME: "{{ EDXAPP_FILE_UPLOAD_STORAGE_BUCKET_NAME }}"
  FILE_UPLOAD_STORAGE_PREFIX: "{{ EDXAPP_FILE_UPLOAD_STORAGE_PREFIX }}"
  VIRTUAL_UNIVERSITIES: "{{ EDXAPP_VIRTUAL_UNIVERSITIES }}"
  REGISTRATION_EXTRA_FIELDS: "{{ EDXAPP_REGISTRATION_EXTRA_FIELDS }}"
  XBLOCK_SETTINGS: "{{ EDXAPP_XBLOCK_SETTINGS }}"
  EDXMKTG_USER_INFO_COOKIE_NAME: "{{ EDXAPP_EDXMKTG_USER_INFO_COOKIE_NAME }}"

  # Deprecated, maintained for backward compatibility
  COMPREHENSIVE_THEME_DIR: "{{ EDXAPP_COMPREHENSIVE_THEME_DIR }}"

  COMPREHENSIVE_THEME_DIRS: "{{ EDXAPP_COMPREHENSIVE_THEME_DIRS }}"
  COMPREHENSIVE_THEME_LOCALE_PATHS: "{{ EDXAPP_COMPREHENSIVE_THEME_LOCALE_PATHS }}"
  ENABLE_COMPREHENSIVE_THEMING: "{{ EDXAPP_ENABLE_COMPREHENSIVE_THEMING }}"
  DEFAULT_SITE_THEME: "{{ EDXAPP_DEFAULT_SITE_THEME }}"
  SESSION_SAVE_EVERY_REQUEST: "{{ EDXAPP_SESSION_SAVE_EVERY_REQUEST }}"
  SOCIAL_SHARING_SETTINGS: "{{ EDXAPP_SOCIAL_SHARING_SETTINGS }}"
  SESSION_COOKIE_SECURE: "{{ EDXAPP_SESSION_COOKIE_SECURE }}"
  CODE_JAIL:
    # from https://github.com/edx/codejail/blob/master/codejail/django_integration.py#L24, '' should be same as None
    python_bin: '{% if EDXAPP_PYTHON_SANDBOX %}{{ edxapp_sandbox_venv_dir }}/bin/python{% endif %}'
    limits: "{{ EDXAPP_CODE_JAIL_LIMITS }}"
    user: '{{ edxapp_sandbox_user }}'
  AFFILIATE_COOKIE_NAME: "{{ EDXAPP_AFFILIATE_COOKIE_NAME }}"
  ELASTIC_SEARCH_CONFIG: "{{ EDXAPP_ELASTIC_SEARCH_CONFIG }}"
  PLATFORM_TWITTER_ACCOUNT: "{{ EDXAPP_PLATFORM_TWITTER_ACCOUNT }}"
  PLATFORM_FACEBOOK_ACCOUNT: "{{ EDXAPP_PLATFORM_FACEBOOK_ACCOUNT }}"

lms_auth_config:
  <<: *edxapp_generic_auth
  SEGMENT_KEY: "{{ EDXAPP_LMS_SEGMENT_KEY }}"
  OPTIMIZELY_PROJECT_ID: "{{ EDXAPP_OPTIMIZELY_PROJECT_ID }}"
  EDX_API_KEY: "{{ EDXAPP_EDX_API_KEY }}"
  VERIFY_STUDENT: "{{ EDXAPP_VERIFY_STUDENT }}"
  GOOGLE_ANALYTICS_LINKEDIN: "{{ EDXAPP_GOOGLE_ANALYTICS_LINKEDIN }}"
  CC_PROCESSOR_NAME: "{{ EDXAPP_CC_PROCESSOR_NAME }}"
  CC_PROCESSOR: "{{ EDXAPP_CC_PROCESSOR }}"
  TRACKING_SEGMENTIO_WEBHOOK_SECRET: "{{ EDXAPP_TRACKING_SEGMENTIO_WEBHOOK_SECRET }}"
  PROFILE_IMAGE_SECRET_KEY: "{{ EDXAPP_PROFILE_IMAGE_SECRET_KEY }}"
  MODULESTORE:
    default:
        ENGINE: 'xmodule.modulestore.mixed.MixedModuleStore'
        OPTIONS:
          mappings: {}
          stores:
            - NAME: 'split'
              ENGINE: 'xmodule.modulestore.split_mongo.split_draft.DraftVersioningModuleStore'
              DOC_STORE_CONFIG: "{{ EDXAPP_LMS_SPLIT_DOC_STORE_CONFIG }}"
              OPTIONS:
                default_class: 'xmodule.hidden_module.HiddenDescriptor'
                fs_root:  "{{ edxapp_course_data_dir }}"
                render_template: 'edxmako.shortcuts.render_to_string'
            - NAME: 'draft'
              ENGINE: 'xmodule.modulestore.mongo.DraftMongoModuleStore'
              DOC_STORE_CONFIG: "{{ EDXAPP_LMS_DRAFT_DOC_STORE_CONFIG }}"
              OPTIONS:
                default_class: 'xmodule.hidden_module.HiddenDescriptor'
                fs_root:  "{{ edxapp_course_data_dir }}"
                render_template: 'edxmako.shortcuts.render_to_string'
  PROCTORING_BACKEND_PROVIDER: "{{ EDXAPP_PROCTORING_BACKEND_PROVIDER }}"
  SOCIAL_AUTH_OAUTH_SECRETS: "{{ EDXAPP_SOCIAL_AUTH_OAUTH_SECRETS }}"


lms_env_config:
  <<: *edxapp_generic_env
  OAUTH_ENFORCE_SECURE: "{{ EDXAPP_OAUTH_ENFORCE_SECURE }}"
  OAUTH_EXPIRE_CONFIDENTIAL_CLIENT_DAYS: "{{ EDXAPP_OAUTH_EXPIRE_CONFIDENTIAL_CLIENT_DAYS }}"
  OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS: "{{ EDXAPP_OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS }}"
  PAID_COURSE_REGISTRATION_CURRENCY: "{{ EDXAPP_PAID_COURSE_REGISTRATION_CURRENCY }}"
  GIT_REPO_DIR: "{{ EDXAPP_GIT_REPO_DIR }}"
  SITE_NAME:  "{{ EDXAPP_LMS_SITE_NAME }}"
  VIDEO_CDN_URL: "{{ EDXAPP_VIDEO_CDN_URLS }}"
  PDF_RECEIPT_TAX_ID: "{{ EDXAPP_PDF_RECEIPT_TAX_ID }}"
  PDF_RECEIPT_FOOTER_TEXT: "{{ EDXAPP_PDF_RECEIPT_FOOTER_TEXT }}"
  PDF_RECEIPT_DISCLAIMER_TEXT: "{{ EDXAPP_PDF_RECEIPT_DISCLAIMER_TEXT }}"
  PDF_RECEIPT_BILLING_ADDRESS: "{{ EDXAPP_PDF_RECEIPT_BILLING_ADDRESS }}"
  PDF_RECEIPT_TERMS_AND_CONDITIONS: "{{ EDXAPP_PDF_RECEIPT_TERMS_AND_CONDITIONS }}"
  PDF_RECEIPT_TAX_ID_LABEL: "{{ EDXAPP_PDF_RECEIPT_TAX_ID_LABEL }}"
  PDF_RECEIPT_COBRAND_LOGO_PATH: "{{ EDXAPP_PDF_RECEIPT_COBRAND_LOGO_PATH }}"
  PDF_RECEIPT_LOGO_PATH: "{{ EDXAPP_PDF_RECEIPT_LOGO_PATH }}"
  PROFILE_IMAGE_BACKEND: "{{ EDXAPP_PROFILE_IMAGE_BACKEND }}"
  PROFILE_IMAGE_MIN_BYTES: "{{ EDXAPP_PROFILE_IMAGE_MIN_BYTES }}"
  PROFILE_IMAGE_MAX_BYTES: "{{ EDXAPP_PROFILE_IMAGE_MAX_BYTES }}"
  EDXNOTES_PUBLIC_API: "{{ EDXAPP_EDXNOTES_PUBLIC_API }}"
  EDXNOTES_INTERNAL_API: "{{ EDXAPP_EDXNOTES_INTERNAL_API }}"
  RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS: "{{ EDXAPP_RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS }}"
  RETRY_ACTIVATION_EMAIL_TIMEOUT: "{{ EDXAPP_RETRY_ACTIVATION_EMAIL_TIMEOUT }}"
  LTI_USER_EMAIL_DOMAIN: "{{ EDXAPP_LTI_USER_EMAIL_DOMAIN }}"
  LTI_AGGREGATE_SCORE_PASSBACK_DELAY: "{{ EDXAPP_LTI_AGGREGATE_SCORE_PASSBACK_DELAY }}"
  PROCTORING_SETTINGS: "{{ EDXAPP_PROCTORING_SETTINGS }}"
  CREDIT_HELP_LINK_URL: "{{ EDXAPP_CREDIT_HELP_LINK_URL }}"
  MAILCHIMP_NEW_USER_LIST_ID: "{{ EDXAPP_MAILCHIMP_NEW_USER_LIST_ID }}"
  CONTACT_MAILING_ADDRESS: "{{ EDXAPP_CONTACT_MAILING_ADDRESS }}"
  AUDIT_CERT_CUTOFF_DATE: "{{ EDXAPP_AUDIT_CERT_CUTOFF_DATE }}"
  API_ACCESS_MANAGER_EMAIL: "{{ EDXAPP_API_ACCESS_MANAGER_EMAIL }}"
  API_ACCESS_FROM_EMAIL: "{{ EDXAPP_API_ACCESS_FROM_EMAIL }}"
  API_DOCUMENTATION_URL: "{{ EDXAPP_API_DOCUMENTATION_URL }}"
  AUTH_DOCUMENTATION_URL: "{{ EDXAPP_AUTH_DOCUMENTATION_URL }}"
  DOC_LINK_BASE_URL: "{{ EDXAPP_LMS_DOC_LINK_BASE_URL }}"
  RECALCULATE_GRADES_ROUTING_KEY: "{{ EDXAPP_RECALCULATE_GRADES_ROUTING_KEY }}"
  CELERY_QUEUES: "{{ EDXAPP_LMS_CELERY_QUEUES }}"
  ALTERNATE_WORKER_QUEUES: "cms"
  LMS_ALLOWED_HOSTS: "{{ EDXAPP_LMS_ALLOWED_HOSTS }}"

cms_auth_config:
  <<: *edxapp_generic_auth
  SEGMENT_KEY: "{{ EDXAPP_CMS_SEGMENT_KEY }}"
  MODULESTORE:
    default:
        ENGINE: 'xmodule.modulestore.mixed.MixedModuleStore'
        OPTIONS:
          mappings: {}
          stores:
            - NAME: 'split'
              ENGINE: 'xmodule.modulestore.split_mongo.split_draft.DraftVersioningModuleStore'
              DOC_STORE_CONFIG: "{{ EDXAPP_CMS_DOC_STORE_CONFIG }}"
              OPTIONS:
                default_class: 'xmodule.hidden_module.HiddenDescriptor'
                fs_root:  "{{ edxapp_course_data_dir }}"
                render_template: 'edxmako.shortcuts.render_to_string'
            - NAME: 'draft'
              ENGINE: 'xmodule.modulestore.mongo.DraftMongoModuleStore'
              DOC_STORE_CONFIG: "{{ EDXAPP_CMS_DOC_STORE_CONFIG }}"
              OPTIONS:
                default_class: 'xmodule.hidden_module.HiddenDescriptor'
                fs_root:  "{{ edxapp_course_data_dir }}"
                render_template: 'edxmako.shortcuts.render_to_string'
  PARSE_KEYS: "{{ EDXAPP_PARSE_KEYS }}"

cms_env_config:
  <<: *edxapp_generic_env
  SITE_NAME:  "{{ EDXAPP_CMS_SITE_NAME }}"
  GIT_REPO_EXPORT_DIR: "{{ EDXAPP_GIT_REPO_EXPORT_DIR }}"
  DOC_LINK_BASE_URL: "{{ EDXAPP_CMS_DOC_LINK_BASE_URL }}"
  CELERY_QUEUES: "{{ EDXAPP_CMS_CELERY_QUEUES }}"
  RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS: "{{ EDXAPP_RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS }}"
  RETRY_ACTIVATION_EMAIL_TIMEOUT: "{{ EDXAPP_RETRY_ACTIVATION_EMAIL_TIMEOUT }}"
  ENABLE_MULTI_SITE_VIEWLIVE_DROPDOWN: "{{ EDXAPP_ENABLE_MULTI_SITE_VIEWLIVE_DROPDOWN }}"
  ALTERNATE_WORKER_QUEUES: "lms"
  COURSE_IMPORT_EXPORT_BUCKET: "{{ EDXAPP_IMPORT_EXPORT_BUCKET }}"
  CMS_ALLOWED_HOSTS: "{{ EDXAPP_CMS_ALLOWED_HOSTS }}"

# install dir for the edx-platform repo
edxapp_code_dir: "{{ edxapp_app_dir }}/edx-platform"

# gunicorn ports/hosts, these shouldn't need to be overridden
edxapp_cms_gunicorn_port: 8010
edxapp_cms_gunicorn_host: 127.0.0.1
edxapp_lms_gunicorn_port: 8000
edxapp_lms_gunicorn_host: 127.0.0.1
edxapp_lms_preview_gunicorn_port: 8000

# These vars are for creating the application json config
# files.  There are two for each service that uses the
# 'edx-platform' code.  Defining them will create the upstart
# job.  It will also enable the corresponding section in the
# 'edxapp' upstart job.

service_variants_enabled:
  - lms
  - cms

#Number of gunicorn worker processes to spawn, as a multiplier to number of virtual cores
worker_core_mult:
  lms: 4
  cms: 2

# Stanford-style Theming
# Turn theming on and off with edxapp_use_custom_theme
# Set theme name with edxapp_theme_name
# Stanford, for example, uses edxapp_theme_name: 'stanford'
#
# TODO: change variables to ALL-CAPS, since they are meant to be externally overridden
edxapp_use_custom_theme: false
edxapp_theme_name: ""
edxapp_theme_source_repo: 'https://{{ COMMON_GIT_MIRROR }}/Stanford-Online/edx-theme.git'
edxapp_theme_version: 'master'

# make this the public URL instead of writable
edx_platform_repo: "https://{{ COMMON_GIT_MIRROR }}/edx/edx-platform.git"
# `edx_platform_version` can be anything that git recognizes as a commit
# reference, including a tag, a branch name, or a commit hash
edx_platform_version: 'release'
pre_requirements_file:    "{{ edxapp_code_dir }}/requirements/edx/pre.txt"
github_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/github.txt"
custom_requirements_file:   "{{ edxapp_code_dir }}/requirements/edx/custom.txt"
local_requirements_file:  "{{ edxapp_code_dir }}/requirements/edx/local.txt"
base_requirements_file:   "{{ edxapp_code_dir }}/requirements/edx/base.txt"
post_requirements_file:   "{{ edxapp_code_dir }}/requirements/edx/post.txt"
paver_requirements_file:   "{{ edxapp_code_dir }}/requirements/edx/paver.txt"
private_requirements_file:   "{{ edxapp_code_dir }}/requirements/edx/edx-private.txt"

sandbox_base_requirements:  "{{ edxapp_code_dir }}/requirements/edx-sandbox/base.txt"
sandbox_local_requirements: "{{ edxapp_code_dir }}/requirements/edx-sandbox/local.txt"
sandbox_post_requirements:  "{{ edxapp_code_dir }}/requirements/edx-sandbox/post.txt"

# The Python requirements files in the order they should be installed.  This order should
# match the order of PYTHON_REQ_FILES in edx-platform/pavelib/prereqs.py.  (Also check the
# edx-solutions fork of edx-platform when if you consider reordering this list.)
# private_requirements_file is not included in this list, since it is only installed
# conditionally based on the value of EDXAPP_INSTALL_PRIVATE_REQUIREMENTS.
edxapp_requirements_files:
  - "{{ pre_requirements_file }}"
  - "{{ github_requirements_file }}"
  - "{{ custom_requirements_file }}"
  - "{{ local_requirements_file }}"
  - "{{ base_requirements_file }}"
  - "{{ post_requirements_file }}"
  - "{{ paver_requirements_file }}"

# All edxapp requirements files potentially containing Github URLs.  When using a custom
# Github mirror, occurrences of "github.com" are replaced by the custom mirror in these
# files.
edxapp_requirements_with_github_urls:
  - "{{ pre_requirements_file }}"
  - "{{ github_requirements_file }}"
  - "{{ custom_requirements_file }}"
  - "{{ base_requirements_file }}"
  - "{{ post_requirements_file }}"
  - "{{ paver_requirements_file }}"
  - "{{ private_requirements_file }}"
  - "{{ sandbox_post_requirements }}"
  - "{{ sandbox_local_requirements }}"
  - "{{ sandbox_base_requirements }}"

edxapp_chrislea_ppa: "ppa:chris-lea/node.js"

edxapp_debian_pkgs:
  # for compiling the virtualenv
  # (only needed if wheel files aren't available)
  - s3cmd
  - pkg-config
  # for scipy, do not install
  # libopenblas-base, it will cause
  # problems for numpy
  - g++
  # apparmor
  - apparmor-utils
  # misc
  - curl
  - ipython
  - nodejs
  - ntp
  # matplotlib needs libfreetype6-dev
  - libfreetype6-dev
  # cffi needs libffi-dev
  - libffi-dev
  - python-dev
  - libsqlite3-dev

# Deploy Specific Vars
edxapp_lms_variant: lms
edxapp_cms_variant: cms

# Worker Settings
worker_django_settings_module: '{{ EDXAPP_SETTINGS }}'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



playbooks/roles/edxapp/defaults/main.yml [3:1253]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---

# These are variables that default to a localhost
# setup and are meant to be overwritten for
# different environments.
#
# Variables in all caps are environment specific
# Lowercase variables are internal to the role
#
# Defaults specified here should not contain
# any secrets or host identifying information.
#
# Variables set to "None" will be converted to None
# when the edxapp config is written to disk.

# Bucket used for xblock file storage
EDXAPP_XBLOCK_FS_STORAGE_BUCKET: "None"
EDXAPP_XBLOCK_FS_STORAGE_PREFIX: "None"
EDXAPP_DJFS:
  type: 'osfs'
  directory_root: '{{ edxapp_data_dir }}/django-pyfs/static/django-pyfs'
  url_root : '/static/django-pyfs'

EDXAPP_LMS_BASE: "{{ EDXAPP_LMS_SITE_NAME }}:{{ EDXAPP_LMS_NGINX_PORT }}"
EDXAPP_PREVIEW_LMS_BASE: "preview.{{ EDXAPP_LMS_SITE_NAME }}:{{ EDXAPP_LMS_NGINX_PORT }}"
EDXAPP_CMS_BASE: "{{ EDXAPP_CMS_SITE_NAME }}:{{ EDXAPP_CMS_NGINX_PORT }}"

EDXAPP_LMS_GUNICORN_EXTRA: ""
EDXAPP_LMS_GUNICORN_EXTRA_CONF: ""

EDXAPP_CMS_GUNICORN_EXTRA: ""
EDXAPP_CMS_GUNICORN_EXTRA_CONF: ""

# Set this to the maximum number
# of requests for gunicorn for the lms and cms
# gunicorn --max-requests <num>
EDXAPP_LMS_MAX_REQ: !!null
EDXAPP_CMS_MAX_REQ: !!null
# 'None' will be written out as null in
# the configuration on disk
EDXAPP_AWS_ACCESS_KEY_ID:  "None"
EDXAPP_AWS_SECRET_ACCESS_KEY:  "None"
EDXAPP_AZURE_ACCOUNT_NAME: "None"
EDXAPP_AZURE_ACCOUNT_KEY: "None"
EDXAPP_AZURE_CONTAINER: "None"
EDXAPP_AWS_QUERYSTRING_AUTH: false
EDXAPP_AWS_STORAGE_BUCKET_NAME: "SET-ME-PLEASE (ex. bucket-name)"
EDXAPP_IMPORT_EXPORT_BUCKET: "SET-ME-PLEASE (ex. bucket-name)"
EDXAPP_AWS_S3_CUSTOM_DOMAIN: "SET-ME-PLEASE (ex. bucket-name.s3.amazonaws.com)"
EDXAPP_SWIFT_USERNAME: "None"
EDXAPP_SWIFT_KEY: "None"
EDXAPP_SWIFT_TENANT_ID: "None"
EDXAPP_SWIFT_TENANT_NAME: "None"
EDXAPP_SWIFT_AUTH_URL: "None"
EDXAPP_SWIFT_AUTH_VERSION: "None"
EDXAPP_SWIFT_REGION_NAME: "None"
EDXAPP_SWIFT_USE_TEMP_URLS: false
EDXAPP_SWIFT_TEMP_URL_KEY: "None"
EDXAPP_SWIFT_TEMP_URL_DURATION: 1800  # seconds
EDXAPP_DEFAULT_FILE_STORAGE:  "django.core.files.storage.FileSystemStorage"
EDXAPP_XQUEUE_BASIC_AUTH: [ "{{ COMMON_HTPASSWD_USER }}", "{{ COMMON_HTPASSWD_PASS }}" ]
EDXAPP_XQUEUE_DJANGO_AUTH:
  username: 'lms'
  password: 'password'
EDXAPP_XQUEUE_URL: 'http://localhost:18040'

EDXAPP_MONGO_HOSTS: ['localhost']
EDXAPP_MONGO_PASSWORD: 'password'
EDXAPP_MONGO_PORT: 27017
EDXAPP_MONGO_USER: 'edxapp'
EDXAPP_MONGO_DB_NAME: 'edxapp'
EDXAPP_MONGO_USE_SSL: False

EDXAPP_MYSQL_DB_NAME: 'edxapp'
EDXAPP_MYSQL_USER: 'edxapp001'
EDXAPP_MYSQL_USER_ADMIN: 'root'
EDXAPP_MYSQL_PASSWORD: 'password'
EDXAPP_MYSQL_PASSWORD_READ_ONLY: 'password'
EDXAPP_MYSQL_PASSWORD_ADMIN: 'password'
EDXAPP_MYSQL_REPLICA_DB_NAME: "{{ EDXAPP_MYSQL_DB_NAME }}"
EDXAPP_MYSQL_REPLICA_USER: "{{ EDXAPP_MYSQL_USER }}"
EDXAPP_MYSQL_REPLICA_PASSWORD: "{{ EDXAPP_MYSQL_PASSWORD }}"
EDXAPP_MYSQL_REPLICA_HOST: "{{ EDXAPP_MYSQL_HOST }}"
EDXAPP_MYSQL_REPLICA_PORT: "{{ EDXAPP_MYSQL_PORT }}"
EDXAPP_MYSQL_CSMH_DB_NAME: "edxapp_csmh"
EDXAPP_MYSQL_CSMH_USER: "{{ EDXAPP_MYSQL_USER }}"
EDXAPP_MYSQL_CSMH_PASSWORD: "{{ EDXAPP_MYSQL_PASSWORD }}"
EDXAPP_MYSQL_CSMH_HOST: "{{ EDXAPP_MYSQL_HOST }}"
EDXAPP_MYSQL_CSMH_PORT: "{{ EDXAPP_MYSQL_PORT }}"

EDXAPP_MYSQL_HOST: 'localhost'
EDXAPP_MYSQL_PORT: '3306'

# list of dictionaries of the format
# { 'host': 'hostname', 'port': 'portnumber', 'otherconfigsuchas use_ssl': 'True' }
# http://elasticsearch-py.readthedocs.org/en/master/api.html#elasticsearch
EDXAPP_ELASTIC_SEARCH_CONFIG:
    - host: "localhost"
      port: 9200

EDXAPP_SETTINGS: '{{ COMMON_EDXAPP_SETTINGS }}'

EDXAPP_LMS_ENV: 'lms.envs.{{ EDXAPP_SETTINGS }}'
EDXAPP_CMS_ENV: 'cms.envs.{{ EDXAPP_SETTINGS }}'

EDXAPP_EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'
EDXAPP_EMAIL_HOST: 'localhost'
EDXAPP_EMAIL_PORT: 25
EDXAPP_EMAIL_USE_TLS: False
EDXAPP_EMAIL_HOST_USER: ''
EDXAPP_EMAIL_HOST_PASSWORD: ''

EDXAPP_AWS_SES_REGION_NAME: "us-east-1"
EDXAPP_AWS_SES_REGION_ENDPOINT: "email.us-east-1.amazonaws.com"

EDXAPP_LOG_LEVEL: 'INFO'

EDXAPP_MEMCACHE: [ 'localhost:11211' ]
EDXAPP_CACHE_COURSE_STRUCTURE_MEMCACHE: "{{ EDXAPP_MEMCACHE }}"
EDXAPP_COMMENTS_SERVICE_URL:  'http://localhost:18080'
# EDXAPP_COMMENTS_SERVICE_KEY must match FORUM_API_KEY
EDXAPP_COMMENTS_SERVICE_KEY:  'password'

EDXAPP_SESSION_INACTIVITY_TIMEOUT_IN_SECONDS: ""
RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS: ""
EDXAPP_RETRY_ACTIVATION_EMAIL_TIMEOUT: ""
EDXAPP_RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS: ""
EDXAPP_COURSE_CATALOG_VISIBILITY_PERMISSION: ""
EDXAPP_COURSE_ABOUT_VISIBILITY_PERMISSION: ""
EDXAPP_COUNTRIES_OVERRIDE: null
EDXAPP_ALL_LANGUAGES_OVERRIDE: null
EDXAPP_PASSWORD_MIN_LENGTH: ""
EDXAPP_PASSWORD_MAX_LENGTH: ""
EDXAPP_PASSWORD_COMPLEXITY: ""
EDXAPP_ENFORCE_PASSWORD_POLICY: ""
EDXAPP_X_FRAME_OPTIONS: ""

EDXAPP_EDXAPP_SECRET_KEY: "DUMMY KEY CHANGE BEFORE GOING TO PRODUCTION"

EDXAPP_ANALYTICS_API_KEY:  ""
EDXAPP_LTI_USER_EMAIL_DOMAIN: "lti.example.com"
# 900s, or 15 mins
EDXAPP_LTI_AGGREGATE_SCORE_PASSBACK_DELAY: 900
EDXAPP_PAYMENT_SUPPORT_EMAIL: "billing@example.com"
EDXAPP_YOUTUBE_API_KEY: "PUT_YOUR_API_KEY_HERE"
EDXAPP_ZENDESK_USER: ""
EDXAPP_ZENDESK_URL: ""
EDXAPP_ZENDESK_API_KEY: ""
EDXAPP_ZENDESK_CUSTOM_FIELDS: {}
EDXAPP_CELERY_USER: 'celery'
EDXAPP_CELERY_PASSWORD: 'celery'
EDXAPP_CELERY_BROKER_VHOST: ""
EDXAPP_CELERY_BROKER_USE_SSL: false

EDXAPP_VIDEO_CDN_URLS:
  EXAMPLE_COUNTRY_CODE: "http://example.com/edx/video?s3_url="

EDXAPP_CREDIT_HELP_LINK_URL: ""

EDXAPP_PARTNER_SUPPORT_EMAIL: ''

# ISO-8601 formatted date string, or null
EDXAPP_AUDIT_CERT_CUTOFF_DATE: null

EDXAPP_PLATFORM_NAME: 'Your Platform Name Here'
EDXAPP_STUDIO_NAME: 'Studio'
EDXAPP_STUDIO_SHORT_NAME: 'Studio'

EDXAPP_CAS_SERVER_URL: ""
EDXAPP_CAS_EXTRA_LOGIN_PARAMS: ""
EDXAPP_CAS_ATTRIBUTE_CALLBACK: ""
EDXAPP_CAS_ATTRIBUTE_PACKAGE: ""
# Enable an end-point that creates a user and logs them in
# Used for performance testing
EDXAPP_ENABLE_AUTO_AUTH: false
# Settings for enabling and configuring third party authorization
EDXAPP_ENABLE_THIRD_PARTY_AUTH: false
EDXAPP_ENABLE_OAUTH2_PROVIDER: false

EDXAPP_ENABLE_MOBILE_REST_API: false

# Settings for API access management
EDXAPP_API_ACCESS_MANAGER_EMAIL: "api-access@example.com"
EDXAPP_API_ACCESS_FROM_EMAIL: "api-requests@example.com"
EDXAPP_API_DOCUMENTATION_URL: "http://course-catalog-api-guide.readthedocs.io/en/latest/"
EDXAPP_AUTH_DOCUMENTATION_URL: "http://course-catalog-api-guide.readthedocs.io/en/latest/authentication/index.html"
EDXAPP_API_COOKIE_URL: ""

# Settings for affiliate cookie tracking
EDXAPP_AFFILIATE_COOKIE_NAME: 'dev_affiliate_id'

EDXAPP_ENABLE_EDXNOTES: false

EDXAPP_ENABLE_CREDIT_ELIGIBILITY: false
EDXAPP_ENABLE_CREDIT_API: false

EDXAPP_CUSTOM_COURSES_EDX: false

EDXAPP_ENABLE_SYSADMIN_DASHBOARD: false

# Enable unrestricted access course staff to grade downloads
EDXAPP_ALLOW_COURSE_STAFF_GRADE_DOWNLOADS: true

# Enable Azure Media Service XBlock for embed video player
EDXAPP_ENABLE_AZURE_MEDIA_SERVICES_XBLOCK: false

# This is different from lms/envs/common.py
# We're turning it on in config because it needs a lot more configuration
# support, such as settings.DATABASES and initial database creation which is
# handled in the play.
EDXAPP_ENABLE_CSMH_EXTENDED: True
EDXAPP_ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES: True

EDXAPP_GIT_REPO_DIR: '/edx/var/edxapp/course_repos'
EDXAPP_GIT_REPO_EXPORT_DIR: '/edx/var/edxapp/export_course_repos'

EDXAPP_ONLOAD_BEACON_SAMPLE_RATE: 0.0

EDXAPP_FINANCIAL_REPORTS:
  BUCKET: !!null
  ROOT_PATH: "sandbox"
  STORAGE_TYPE: "localfs"

#Only address should have newlines
EDXAPP_PDF_RECEIPT_BILLING_ADDRESS: |
  Enter your receipt billing
  address here.

EDXAPP_PDF_RECEIPT_DISCLAIMER_TEXT: >
  ENTER YOUR RECEIPT DISCLAIMER TEXT HERE.

EDXAPP_PDF_RECEIPT_FOOTER_TEXT: >
  Enter your receipt footer text here.

EDXAPP_PDF_RECEIPT_TERMS_AND_CONDITIONS: >
  Enter your receipt terms and conditions here.

EDXAPP_PDF_RECEIPT_TAX_ID: "00-0000000"
EDXAPP_PDF_RECEIPT_TAX_ID_LABEL: "fake Tax ID"
EDXAPP_PDF_RECEIPT_COBRAND_LOGO_PATH: ""
EDXAPP_PDF_RECEIPT_LOGO_PATH: ""

EDXAPP_SOCIAL_AUTH_OAUTH_SECRETS: ""

# Replaced by oxa-tools/config/server-vars.yml
EDXAPP_FEATURES:
  AUTH_USE_OPENID_PROVIDER: true
  ENABLE_DISCUSSION_SERVICE: true
  ENABLE_INSTRUCTOR_ANALYTICS: false
  PREVIEW_LMS_BASE: "{{ EDXAPP_PREVIEW_LMS_BASE }}"
  ENABLE_GRADE_DOWNLOADS: true
  USE_CUSTOM_THEME: "{{ edxapp_use_custom_theme }}"
  ENABLE_MKTG_SITE: "{{ EDXAPP_ENABLE_MKTG_SITE }}"
  AUTOMATIC_AUTH_FOR_TESTING: "{{ EDXAPP_ENABLE_AUTO_AUTH }}"
  ENABLE_THIRD_PARTY_AUTH: "{{ EDXAPP_ENABLE_THIRD_PARTY_AUTH }}"
  ENABLE_VIDEO_UPLOAD_PIPELINE: false
  ENABLE_DISCUSSION_HOME_PANEL: true
  ENABLE_COMBINED_LOGIN_REGISTRATION: true
  ENABLE_CORS_HEADERS: false
  ENABLE_CROSS_DOMAIN_CSRF_COOKIE: false
  ENABLE_COUNTRY_ACCESS: false
  ENABLE_VIDEO_BEACON: false
  ENABLE_ONLOAD_BEACON: false
  ENABLE_EDXNOTES: "{{ EDXAPP_ENABLE_EDXNOTES }}"
  ENABLE_CREDIT_API: "{{ EDXAPP_ENABLE_CREDIT_API }}"
  ENABLE_CREDIT_ELIGIBILITY: "{{ EDXAPP_ENABLE_CREDIT_ELIGIBILITY }}"
  ENABLE_SPECIAL_EXAMS: false
  ENABLE_OAUTH2_PROVIDER: "{{ EDXAPP_ENABLE_OAUTH2_PROVIDER }}"
  ENABLE_SYSADMIN_DASHBOARD: "{{ EDXAPP_ENABLE_SYSADMIN_DASHBOARD }}"
  ENABLE_MOBILE_REST_API: "{{ EDXAPP_ENABLE_MOBILE_REST_API }}"
  CUSTOM_COURSES_EDX: "{{ EDXAPP_CUSTOM_COURSES_EDX }}"
  ENABLE_CSMH_EXTENDED: "{{ EDXAPP_ENABLE_CSMH_EXTENDED }}"
  ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES: "{{ EDXAPP_ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES }}"
  ALLOW_COURSE_STAFF_GRADE_DOWNLOADS: "{{EDXAPP_ALLOW_COURSE_STAFF_GRADE_DOWNLOADS}}"
  ENABLE_AZURE_MEDIA_SERVICE_XBLOCK: "{{EDXAPP_ENABLE_AZURE_MEDIA_SERVICES_XBLOCK}}"

EDXAPP_BOOK_URL: ""
# This needs to be set to localhost
# if xqueue is run on the same server
# as the lms (it's sent in the request)
EDXAPP_SITE_NAME: 'localhost'
EDXAPP_LMS_SITE_NAME: "{{ EDXAPP_SITE_NAME }}"
EDXAPP_CMS_SITE_NAME: 'localhost'
EDXAPP_PREVIEW_SITE_NAME: "preview.{{ EDXAPP_SITE_NAME }}"
EDXAPP_MEDIA_URL:  "/media"
EDXAPP_ANALYTICS_SERVER_URL:  ""
EDXAPP_FEEDBACK_SUBMISSION_EMAIL: ""
EDXAPP_CELERY_BROKER_HOSTNAME: ""
EDXAPP_LOGGING_ENV:  'sandbox'

EDXAPP_SYSLOG_SERVER: ""
EDXAPP_RABBIT_HOSTNAME: 'localhost'

EDXAPP_LMS_NGINX_PORT: 18000
EDXAPP_LMS_SSL_NGINX_PORT: 48000

EDXAPP_CMS_NGINX_PORT: 18010
EDXAPP_CMS_SSL_NGINX_PORT: 48010

# Multi site view live drop down related variable for cms
EDXAPP_ENABLE_MULTI_SITE_VIEWLIVE_DROPDOWN: false

# NGINX Rate limiting related vars
EDXAPP_ENABLE_RATE_LIMITING: false
EDXAPP_COURSES_REQUEST_RATE: '5r/s'
EDXAPP_COURSES_REQUEST_BURST_RATE: 10
EDXAPP_COURSES_USER_AGENT_BURST_RATE: 5
EDXAPP_RATE_LIMITED_USER_AGENTS: []

EDXAPP_LANG: 'en_US.UTF-8'
EDXAPP_LANGUAGE_CODE : 'en'
EDXAPP_TIME_ZONE: 'America/New_York'

EDXAPP_LMS_DOC_LINK_BASE_URL: 'https://edx.readthedocs.io/projects/open-edx-learner-guide'
EDXAPP_CMS_DOC_LINK_BASE_URL: 'https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course'

EDXAPP_TECH_SUPPORT_EMAIL: 'technical@example.com'
EDXAPP_CONTACT_EMAIL: 'info@example.com'
EDXAPP_BUGS_EMAIL: 'bugs@example.com'
EDXAPP_DEFAULT_FROM_EMAIL: 'registration@example.com'
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_BULK_EMAIL_LOG_SENT_EMAILS: false
EDXAPP_UNIVERSITY_EMAIL: 'university@example.com'
EDXAPP_PRESS_EMAIL: 'press@example.com'
EDXAPP_LMS_ROOT_URL: "{{ EDXAPP_LMS_BASE_SCHEME | default('https') }}://{{ EDXAPP_LMS_BASE }}"
EDXAPP_LMS_ISSUER: "{{ EDXAPP_LMS_ROOT_URL }}/oauth2"
EDXAPP_JWT_EXPIRATION: 30  # Number of seconds until expiration
EDXAPP_JWT_AUDIENCE: "lms-key"
EDXAPP_JWT_SECRET_KEY: "lms-secret"

EDXAPP_PLATFORM_TWITTER_ACCOUNT: '@YourPlatformTwitterAccount'
EDXAPP_PLATFORM_FACEBOOK_ACCOUNT: 'http://www.facebook.com/YourPlatformFacebookAccount'
EDXAPP_FACEBOOK_APP_ID: "FACEBOOK_APP_ID"
EDXAPP_FACEBOOK_APP_SECRET: "FACEBOOK_APP_SECRET"
EDXAPP_FACEBOOK_API_VERSION: "v2.1"

EDXAPP_CONTACT_MAILING_ADDRESS: 'SET-ME-PLEASE'

EDXAPP_SOCIAL_MEDIA_FOOTER_URLS: {}
EDXAPP_MOBILE_STORE_URLS: {}
EDXAPP_FOOTER_ORGANIZATION_IMAGE: "images/logo.png"

EDXAPP_ENV_EXTRA: {}
EDXAPP_AUTH_EXTRA: {}
EDXAPP_LMS_AUTH_EXTRA: "{{ EDXAPP_AUTH_EXTRA }}"
EDXAPP_CMS_AUTH_EXTRA: "{{ EDXAPP_AUTH_EXTRA }}"
EDXAPP_ENABLE_MKTG_SITE: false
EDXAPP_MKTG_URL_LINK_MAP: {}
EDXAPP_MKTG_URLS: {}
EDXAPP_SUPPORT_SITE_LINK: ''
EDXAPP_EDXMKTG_USER_INFO_COOKIE_NAME: "edx-user-info"
# Set this sets the url for static files
# Override this var to use a CDN
# Example: xxxxx.cloudfront.net/static/
EDXAPP_STATIC_URL_BASE: "/static/"

# Settings for Grade downloads
EDXAPP_GRADE_STORAGE_CLASS: 'django.core.files.storage.FileSystemStorage'
EDXAPP_GRADE_STORAGE_KWARGS:
  location: /tmp/edx-s3/grades

# Credit card processor
# These are the same defaults set in common.py
EDXAPP_CC_PROCESSOR_NAME: "CyberSource2"
EDXAPP_CC_PROCESSOR:
  CyberSource:
    SHARED_SECRET: ""
    MERCHANT_ID: ""
    SERIAL_NUMBER: ""
    ORDERPAGE_VERSION: '7'
    PURCHASE_ENDPOINT: ""
  CyberSource2:
    PURCHASE_ENDPOINT: ""
    SECRET_KEY: ""
    ACCESS_KEY: ""
    PROFILE_ID: ""

# does not affect verified students
EDXAPP_PAID_COURSE_REGISTRATION_CURRENCY: ['usd', '$']

# Configure paver tasks in edx-platform to skip Python/Ruby/Node installation
EDXAPP_NO_PREREQ_INSTALL: 1

# whether to setup the python codejail or not
EDXAPP_PYTHON_SANDBOX: true
# this next setting, if true, turns on actual sandbox enforcement.  If not true,
# it puts the sandbox in 'complain' mode, for reporting but not enforcement
EDXAPP_SANDBOX_ENFORCE: true

# Vars that are used when the automated role is "mixed-in" via the deploying play
# This data structure specifies all the users with access to run command remotely
# over SSH and the fully qualified command that they can run via sudo to the
# application user

EDXAPP_AUTOMATED_USERS:
  automated_user:
    sudo_commands:
      - command: "{{ edxapp_venv_bin }}/python {{ edxapp_code_dir }}/manage.py lms migrate --list --settings={{ edxapp_settings }}"
        sudo_user: "edxapp"
    authorized_keys:
      - "SSH authorized key"

EDXAPP_USE_GIT_IDENTITY: false
# Paste the contents of the git identity
# into this var
EDXAPP_GIT_IDENTITY: !!null

EDXAPP_UPDATE_STATIC_FILES_KEY: false
# Set this to true if you want to install the private pip
# requirements in the edx-platform repo.
# This will use EDXAPP_GIT_IDENTITY, EDXAPP_USE_GIT_IDENTITY
# must be set to true if EDXAPP_INSTALL_PRIVATE_REQUIREMENTS is
# set to true

EDXAPP_INSTALL_PRIVATE_REQUIREMENTS: false

# List of additional python packages that should be installed into the
# edxapp virtual environment.
# `name` (required), `version` (optional), and `extra_args` (optional)
# are supported and correspond to the options of ansible's pip module.
# Example:
# EDXAPP_EXTRA_REQUIREMENTS:
#   - name: mypackage
#     version: 1.0.1
#   - name: git+https://git.myproject.org/MyProject#egg=MyProject
EDXAPP_EXTRA_REQUIREMENTS: []

EDXAPP_GOOGLE_ANALYTICS_ACCOUNT: "None"

EDXAPP_OPTIMIZELY_PROJECT_ID: "None"
EDXAPP_TRACKING_SEGMENTIO_WEBHOOK_SECRET: ""
EDXAPP_CMS_SEGMENT_KEY: "None"
EDXAPP_LMS_SEGMENT_KEY: "None"
EDXAPP_EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST: []

EDXAPP_EDX_API_KEY: "PUT_YOUR_API_KEY_HERE"
# This is the default set in common.py
EDXAPP_VERIFY_STUDENT:
  DAYS_GOOD_FOR: 365
  EXPIRING_SOON_WINDOW: 28
EDXAPP_GOOGLE_ANALYTICS_LINKEDIN: ""
EDXAPP_CONTENTSTORE_ADDITIONAL_OPTS: {}
EDXAPP_BULK_EMAIL_EMAILS_PER_TASK: 500
# If using microsites this should point to the microsite repo
EDXAPP_MICROSITE_ROOT_DIR: "{{ edxapp_app_dir }}/edx-microsite"
# this dictionary defines what microsites are configured
EDXAPP_MICROSITE_CONFIGURATION: {}
# Instructor code that will not be run in the code sandbox
EDXAPP_COURSES_WITH_UNSAFE_CODE: []
EDXAPP_SESSION_COOKIE_DOMAIN: ""
EDXAPP_SESSION_COOKIE_NAME: "sessionid"

# XML Course related flags
EDXAPP_XML_FROM_GIT: false
EDXAPP_XML_S3_BUCKET: !!null
EDXAPP_XML_S3_KEY: !!null

EDXAPP_NEWRELIC_LMS_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-edxapp-lms"
EDXAPP_NEWRELIC_CMS_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-edxapp-cms"
EDXAPP_NEWRELIC_WORKERS_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-edxapp-workers"

EDXAPP_ORA2_FILE_PREFIX: '{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}/ora2'
EDXAPP_FILE_UPLOAD_STORAGE_BUCKET_NAME: '{{ EDXAPP_AWS_STORAGE_BUCKET_NAME }}'
EDXAPP_FILE_UPLOAD_STORAGE_PREFIX: 'submissions_attachments'

EDXAPP_CODE_JAIL_LIMITS:
  # Limit the memory of the jailed process to something high but not
  # infinite (512MiB in bytes)
  VMEM: 536870912
  # Time in seconds that the jailed process has to run.
  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
  PROXY: 0

EDXAPP_VIRTUAL_UNIVERSITIES: []
# Set the number of workers explicitly for lms and cms
# Should be set to
# EDXAPP_WORKERS:
#   lms: <num workers>
#   cms: <num workers>
EDXAPP_WORKERS: !!null
EDXAPP_ANALYTICS_DATA_TOKEN: ""
EDXAPP_ANALYTICS_DATA_URL: ""
# Dashboard URL, assumes that the insights role is installed locally
EDXAPP_ANALYTICS_DASHBOARD_URL: ""

EDXAPP_REGISTRATION_EXTRA_FIELDS:
  level_of_education: "optional"
  gender: "optional"
  year_of_birth: "optional"
  mailing_address: "optional"
  goals: "optional"
  honor_code: "required"
  city: "hidden"
  country: "hidden"

EDXAPP_CELERY_WORKERS:
  - queue: low
    service_variant: cms
    concurrency: 1
    monitor: True
  - queue: default
    service_variant: cms
    concurrency: 1
    monitor: True
  - queue: high
    service_variant: cms
    concurrency: 1
    monitor: True
  - queue: low
    service_variant: lms
    concurrency: 1
    monitor: True
  - queue: default
    service_variant: lms
    concurrency: 1
    monitor: True
  - queue: high
    service_variant: lms
    concurrency: 1
    monitor: True
  - queue: high_mem
    service_variant: lms
    concurrency: 1
    monitor: False
    max_tasks_per_child: 1
EDXAPP_RECALCULATE_GRADES_ROUTING_KEY: 'edx.lms.core.default'
EDXAPP_LMS_CELERY_QUEUES: "{{ edxapp_workers|selectattr('service_variant', 'equalto', 'lms')|map(attribute='queue')|map('regex_replace', '(.*)', 'edx.lms.core.\\1')|list }}"
EDXAPP_CMS_CELERY_QUEUES: "{{ edxapp_workers|selectattr('service_variant', 'equalto', 'cms')|map(attribute='queue')|map('regex_replace', '(.*)', 'edx.cms.core.\\1')|list }}"

EDXAPP_DEFAULT_CACHE_VERSION: "1"
EDXAPP_OAUTH_ENFORCE_SECURE: True
EDXAPP_OAUTH_EXPIRE_CONFIDENTIAL_CLIENT_DAYS: 365
EDXAPP_OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS: 30

# Directory for edxapp application configuration files
EDXAPP_CFG_DIR: "{{ COMMON_CFG_DIR }}/edxapp"
EDXAPP_DEPRECATED_ADVANCED_COMPONENT_TYPES: []

# Video Pipeline Settings
EDXAPP_VIDEO_UPLOAD_PIPELINE:
  BUCKET: ''
  ROOT_PATH: ''

EDXAPP_CORS_ORIGIN_WHITELIST: []
EDXAPP_CORS_ORIGIN_ALLOW_ALL: false
EDXAPP_CROSS_DOMAIN_CSRF_COOKIE_DOMAIN: ""
EDXAPP_CROSS_DOMAIN_CSRF_COOKIE_NAME: ""
EDXAPP_CSRF_COOKIE_SECURE: false

# Video Beacon Settings
CDN_VIDEO_URLS: {}
PERFORMANCE_GRAPHITE_URL: 'SetPerformanceGraphiteHostName'

# E-Commerce Related Settings
EDXAPP_ECOMMERCE_PUBLIC_URL_ROOT: "http://localhost:8002"
EDXAPP_ECOMMERCE_API_URL: "http://localhost:8002/api/v2"
# TODO (CCB) Remove this after all references in edx/edx-platform have been removed.
EDXAPP_ECOMMERCE_API_SIGNING_KEY: "{{ EDXAPP_JWT_SECRET_KEY }}"
EDXAPP_COURSE_CATALOG_API_URL: "http://localhost:8008/api/v1"

# Mailchimp Settings
EDXAPP_MAILCHIMP_NEW_USER_LIST_ID: null

# Social Sharing Related Settings
EDXAPP_SOCIAL_SHARING_SETTINGS:
  CUSTOM_COURSE_URLS: false
  DASHBOARD_FACEBOOK: false
  CERTIFICATE_FACEBOOK: false
  CERTIFICATE_TWITTER: false
  DASHBOARD_TWITTER: false

#To use AWS S3 as your backend, you need different kwargs:
# EDXAPP_PROFILE_IMAGE_BACKEND_CONFIG:
#   class: storages.backends.s3boto.S3BotoStorage
#   options:
#     location: /path/to/images
#     bucket: mybucket
#     custom_domain: mybucket.s3.amazonaws.com
#     access_key: XXXAWS_ACCESS_KEYXXX
#     secret_key: XXXAWS_SECRETY_KEYXXX
#     headers:
#       Cache-Control: max-age-{{ EDXAPP_PROFILE_IMAGE_MAX_AGE }}
#NB: access_key and secret_key are unneccessary if you use IAM roles
#NB2: custom_domain is REQUIRED. Otherwise, boto will generate a
# temporary URL whenever asked for the URL of a specific file.
EDXAPP_PROFILE_IMAGE_BACKEND:
  class: storages.backends.overwrite.OverwriteStorage
  options:
    location: "{{ edxapp_media_dir }}/profile-images/"
    base_url: "{{ EDXAPP_MEDIA_URL }}/profile-images/"

EDXAPP_PROFILE_IMAGE_MAX_AGE: 31536000

# used to salt hashed usernames for profile image filenames
EDXAPP_PROFILE_IMAGE_SECRET_KEY: placeholder_secret_key

# In bytes
EDXAPP_PROFILE_IMAGE_MAX_BYTES: 1048576
EDXAPP_PROFILE_IMAGE_MIN_BYTES: 100

EDXAPP_PARSE_KEYS: {}

# In a production environment when using separate clusters, you'll
# want to route requests differently from the LMS (internal api) and
# from JS (public API)
EDXAPP_EDXNOTES_PUBLIC_API: http://localhost:18120/api/v1
EDXAPP_EDXNOTES_INTERNAL_API: http://localhost:18120/api/v1

EDXAPP_XBLOCK_SETTINGS: {}

# Secret keys shared with credit providers.
# Used to digitally sign credit requests (us --> provider)
# and validate responses (provider --> us).
# Each key in the dictionary is a credit provider ID, and
# the value is the 32-character key.
EDXAPP_CREDIT_PROVIDER_SECRET_KEYS: {}

# Proctoring configuration (redirct URLs and keys shared between systems)
EDXAPP_PROCTORING_SETTINGS: {}
EDXAPP_PROCTORING_BACKEND_PROVIDER:
  class: 'edx_proctoring.backends.null.NullBackendProvider'
  options: {}

# Comprehensive Theming
# Deprecated, maintained for backward compatibility
EDXAPP_COMPREHENSIVE_THEME_DIR: ""

# list of paths to the comprehensive theme directories
EDXAPP_COMPREHENSIVE_THEME_DIRS:
  - "{{ EDXAPP_COMPREHENSIVE_THEME_DIR }}"

# list of paths to the comprehensive theme locale directories
EDXAPP_COMPREHENSIVE_THEME_LOCALE_PATHS: []

# Name of the default site theme
EDXAPP_DEFAULT_SITE_THEME: ""
EDXAPP_ENABLE_COMPREHENSIVE_THEMING: false

# Git repo for the comprehensive theme (if using a comprehensive theme
# other than the ones bundled with edx/platform)
EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO: ""
# Git branch, tag, or revision to check out from
# EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO
EDXAPP_COMPREHENSIVE_THEME_VERSION: ""

# SAML KEYS
EDXAPP_SOCIAL_AUTH_SAML_SP_PRIVATE_KEY: ''
EDXAPP_SOCIAL_AUTH_SAML_SP_PUBLIC_CERT: ''

# Session cookie setting
# Only set this to true for client side profiling, never for production
EDXAPP_SESSION_SAVE_EVERY_REQUEST: false

EDXAPP_SESSION_COOKIE_SECURE: false

EDXAPP_LMS_ALLOWED_HOSTS: ["*", "{{ EDXAPP_LMS_SITE_NAME }}", "{{ EDXAPP_PREVIEW_SITE_NAME }}"]
EDXAPP_CMS_ALLOWED_HOSTS: ["*", "{{ EDXAPP_CMS_SITE_NAME }}"]


#-------- Everything below this line is internal to the role ------------

#Use YAML references (& and *) and hash merge <<: to factor out shared settings
#see http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/

edxapp_data_dir: "{{ COMMON_DATA_DIR }}/edxapp"
edxapp_app_dir: "{{ COMMON_APP_DIR }}/edxapp"
edxapp_log_dir: "{{ COMMON_LOG_DIR }}/edxapp"
edxapp_venvs_dir: "{{ edxapp_app_dir }}/venvs"
edxapp_venv_dir: "{{ edxapp_venvs_dir }}/edxapp"
edxapp_venv_bin: "{{ edxapp_venv_dir }}/bin"
edxapp_nodeenv_dir: "{{ edxapp_app_dir }}/nodeenvs/edxapp"
edxapp_nodeenv_bin: "{{ edxapp_nodeenv_dir }}/bin"
edxapp_settings: '{{ EDXAPP_SETTINGS }}'
edxapp_node_version: "{{ common_node_version }}"
# This is where node installs modules, not node itself
edxapp_node_bin: "{{ edxapp_code_dir }}/node_modules/.bin"
edxapp_user: edxapp
edxapp_deploy_path: "{{ edxapp_venv_bin }}:{{ edxapp_code_dir }}/bin:{{ edxapp_node_bin }}:{{ edxapp_nodeenv_bin }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
edxapp_staticfile_dir: "{{ edxapp_data_dir }}/staticfiles"
edxapp_media_dir: "{{ edxapp_data_dir }}/media"
edxapp_course_static_dir: "{{ edxapp_data_dir }}/course_static"
edxapp_course_data_dir: "{{ edxapp_data_dir }}/data"
edxapp_upload_dir: "{{ edxapp_data_dir }}/uploads"
edxapp_theme_dir: "{{ edxapp_data_dir }}/themes"
edxapp_git_identity: "{{ edxapp_app_dir }}/edxapp-git-identity"
edxapp_git_ssh: "/tmp/edxapp_git_ssh.sh"

# TODO: This can be removed once VPC-122 is resolved
edxapp_legacy_course_data_dir: "{{ edxapp_app_dir }}/data"

edxapp_workers: "{{ EDXAPP_CELERY_WORKERS }}"
EDXAPP_WORKER_DEFAULT_STOPWAITSECS: 432000

# setup for python codejail
edxapp_sandbox_venv_dir:  '{{ edxapp_venvs_dir }}/edxapp-sandbox'
edxapp_sandbox_user: 'sandbox'  # I think something about the codejail requires hardcoding this to sandbox:sandbox

# apparmor command
edxapp_aa_command: "{% if EDXAPP_SANDBOX_ENFORCE %}aa-enforce{% else %}aa-complain{% endif %}"

# TODO: old style variable syntax is necessary
# for lists and dictionaries
edxapp_helper_scripts:
    - edxapp-migrate
    - edxapp-runserver
    - edxapp-update-assets
    - edxapp-shell

edxapp_environment:
  LANG: "{{ EDXAPP_LANG }}"
  NO_PREREQ_INSTALL: "{{ EDXAPP_NO_PREREQ_INSTALL }}"
  SKIP_WS_MIGRATIONS: 1
  PATH: "{{ edxapp_deploy_path }}"
  # the settings module for edxapp, DJANGO_SETTINGS_MODULE
  # should be set to {{SERVICE_VARIANT}}.{{EDXAPP_SETTINGS}}
  # where SERVICE_VARIANT is lms or cms
  EDX_PLATFORM_SETTINGS: "{{ EDXAPP_SETTINGS }}"
  # Current set to the app dir for json config, this should
  # be updated to /edx/etc/edxapp when the switch to
  # yaml based configs is complete
  CONFIG_ROOT: "{{ edxapp_app_dir }}"

edxapp_generic_doc_store_config: &edxapp_generic_default_docstore
  db: "{{ EDXAPP_MONGO_DB_NAME }}"
  host: "{{ EDXAPP_MONGO_HOSTS }}"
  password: "{{ EDXAPP_MONGO_PASSWORD }}"
  port: "{{ EDXAPP_MONGO_PORT }}"
  user: "{{ EDXAPP_MONGO_USER }}"
  collection:  'modulestore'
  ssl: "{{ EDXAPP_MONGO_USE_SSL }}"
  # https://api.mongodb.com/python/2.9.1/api/pymongo/mongo_client.html#module-pymongo.mongo_client
  socketTimeoutMS: 3000 # default is never timeout while the connection is open, this means it needs to explicitly close raising pymongo.errors.NetworkTimeout
  connectTimeoutMS: 2000 # default is 20000, I believe raises pymongo.errors.ConnectionFailure
  # Not setting waitQueueTimeoutMS and waitQueueMultiple since pymongo defaults to nobody being allowed to wait


EDXAPP_LMS_DRAFT_DOC_STORE_CONFIG:
  <<: *edxapp_generic_default_docstore

EDXAPP_LMS_SPLIT_DOC_STORE_CONFIG:
  <<: *edxapp_generic_default_docstore

EDXAPP_CMS_DOC_STORE_CONFIG:
  <<: *edxapp_generic_default_docstore

edxapp_databases:
# edxapp's edxapp-migrate scripts and the edxapp_migrate play
# will ensure that any DB not named read_replica will be migrated
# for both the lms and cms.
  read_replica:
    ENGINE: 'django.db.backends.mysql'
    NAME: "{{ EDXAPP_MYSQL_REPLICA_DB_NAME }}"
    USER: "{{ EDXAPP_MYSQL_REPLICA_USER }}"
    PASSWORD: "{{ EDXAPP_MYSQL_REPLICA_PASSWORD }}"
    HOST: "{{ EDXAPP_MYSQL_REPLICA_HOST }}"
    PORT: "{{ EDXAPP_MYSQL_REPLICA_PORT }}"
  default:
    ENGINE: 'django.db.backends.mysql'
    NAME: "{{ EDXAPP_MYSQL_DB_NAME }}"
    USER: "{{ EDXAPP_MYSQL_USER }}"
    PASSWORD: "{{ EDXAPP_MYSQL_PASSWORD }}"
    HOST: "{{ EDXAPP_MYSQL_HOST }}"
    PORT: "{{ EDXAPP_MYSQL_PORT }}"
    ATOMIC_REQUESTS: True
  student_module_history:
    ENGINE: 'django.db.backends.mysql'
    NAME: "{{ EDXAPP_MYSQL_CSMH_DB_NAME }}"
    USER: "{{ EDXAPP_MYSQL_CSMH_USER }}"
    PASSWORD: "{{ EDXAPP_MYSQL_CSMH_PASSWORD }}"
    HOST: "{{ EDXAPP_MYSQL_CSMH_HOST }}"
    PORT: "{{ EDXAPP_MYSQL_CSMH_PORT }}"

edxapp_generic_auth_config:  &edxapp_generic_auth
  EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST: "{{ EDXAPP_EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST }}"
  ECOMMERCE_API_SIGNING_KEY: "{{ EDXAPP_ECOMMERCE_API_SIGNING_KEY }}"
  ANALYTICS_DATA_TOKEN: "{{ EDXAPP_ANALYTICS_DATA_TOKEN }}"
  DEFAULT_FILE_STORAGE:  "{{ EDXAPP_DEFAULT_FILE_STORAGE }}"
  AWS_ACCESS_KEY_ID:  "{{ EDXAPP_AWS_ACCESS_KEY_ID }}"
  AWS_SECRET_ACCESS_KEY: "{{ EDXAPP_AWS_SECRET_ACCESS_KEY }}"
  AZURE_ACCOUNT_NAME: "{{ EDXAPP_AZURE_ACCOUNT_NAME }}"
  AZURE_ACCOUNT_KEY: "{{ EDXAPP_AZURE_ACCOUNT_KEY }}"
  AZURE_CONTAINER: "{{ EDXAPP_AZURE_CONTAINER }}"
  AWS_QUERYSTRING_AUTH: "{{ EDXAPP_AWS_QUERYSTRING_AUTH }}"
  AWS_STORAGE_BUCKET_NAME: "{{ EDXAPP_AWS_STORAGE_BUCKET_NAME }}"
  AWS_S3_CUSTOM_DOMAIN: "{{ EDXAPP_AWS_S3_CUSTOM_DOMAIN }}"
  SWIFT_USERNAME: "{{ EDXAPP_SWIFT_USERNAME }}"
  SWIFT_KEY: "{{ EDXAPP_SWIFT_KEY }}"
  SWIFT_TENANT_ID: "{{ EDXAPP_SWIFT_TENANT_ID }}"
  SWIFT_TENANT_NAME: "{{ EDXAPP_SWIFT_TENANT_NAME }}"
  SWIFT_AUTH_URL: "{{ EDXAPP_SWIFT_AUTH_URL }}"
  SWIFT_AUTH_VERSION: "{{ EDXAPP_SWIFT_AUTH_VERSION }}"
  SWIFT_REGION_NAME: "{{ EDXAPP_SWIFT_REGION_NAME }}"
  SWIFT_USE_TEMP_URLS: "{{ EDXAPP_SWIFT_USE_TEMP_URLS }}"
  SWIFT_TEMP_URL_KEY: "{{ EDXAPP_SWIFT_TEMP_URL_KEY }}"
  SWIFT_TEMP_URL_DURATION: "{{ EDXAPP_SWIFT_TEMP_URL_DURATION }}"
  SESSION_INACTIVITY_TIMEOUT_IN_SECONDS: "{{ EDXAPP_SESSION_INACTIVITY_TIMEOUT_IN_SECONDS }}"
  SECRET_KEY:  "{{ EDXAPP_EDXAPP_SECRET_KEY }}"
  DOC_STORE_CONFIG: "{{ edxapp_generic_doc_store_config }}"
  XQUEUE_INTERFACE:
    basic_auth: "{{ EDXAPP_XQUEUE_BASIC_AUTH }}"
    django_auth: "{{ EDXAPP_XQUEUE_DJANGO_AUTH }}"
    url: "{{ EDXAPP_XQUEUE_URL }}"
  CONTENTSTORE:
    ENGINE:  'xmodule.contentstore.mongo.MongoContentStore'
    #
    # connection strings are duplicated temporarily for
    # backward compatibility
    #
    OPTIONS:
      db: "{{ EDXAPP_MONGO_DB_NAME }}"
      host: "{{ EDXAPP_MONGO_HOSTS }}"
      password: "{{ EDXAPP_MONGO_PASSWORD }}"
      port: "{{ EDXAPP_MONGO_PORT }}"
      user: "{{ EDXAPP_MONGO_USER }}"
      ssl: "{{ EDXAPP_MONGO_USE_SSL }}"
    ADDITIONAL_OPTIONS: "{{ EDXAPP_CONTENTSTORE_ADDITIONAL_OPTS }}"
    DOC_STORE_CONFIG: *edxapp_generic_default_docstore
  DATABASES: "{{ edxapp_databases }}"
  ANALYTICS_API_KEY:  "{{ EDXAPP_ANALYTICS_API_KEY }}"
  EMAIL_HOST_USER: "{{ EDXAPP_EMAIL_HOST_USER }}"
  EMAIL_HOST_PASSWORD: "{{ EDXAPP_EMAIL_HOST_PASSWORD }}"
  RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS: "{{ EDXAPP_RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS }}"
  RETRY_ACTIVATION_EMAIL_TIMEOUT: "{{ EDXAPP_RETRY_ACTIVATION_EMAIL_TIMEOUT }}"
  YOUTUBE_API_KEY: "{{ EDXAPP_YOUTUBE_API_KEY }}"
  ZENDESK_USER: "{{ EDXAPP_ZENDESK_USER }}"
  ZENDESK_API_KEY: "{{ EDXAPP_ZENDESK_API_KEY }}"
  CELERY_BROKER_USER: "{{ EDXAPP_CELERY_USER }}"
  CELERY_BROKER_PASSWORD: "{{ EDXAPP_CELERY_PASSWORD }}"
  GOOGLE_ANALYTICS_ACCOUNT: "{{ EDXAPP_GOOGLE_ANALYTICS_ACCOUNT }}"
  DJFS: "{{ EDXAPP_DJFS }}"
  CREDIT_PROVIDER_SECRET_KEYS: "{{ EDXAPP_CREDIT_PROVIDER_SECRET_KEYS }}"
  SOCIAL_AUTH_SAML_SP_PRIVATE_KEY: "{{ EDXAPP_SOCIAL_AUTH_SAML_SP_PRIVATE_KEY }}"
  SOCIAL_AUTH_SAML_SP_PUBLIC_CERT: "{{ EDXAPP_SOCIAL_AUTH_SAML_SP_PUBLIC_CERT }}"
  FACEBOOK_APP_ID: "{{ EDXAPP_FACEBOOK_APP_ID }}"
  FACEBOOK_APP_SECRET: "{{ EDXAPP_FACEBOOK_APP_SECRET }}"
  FACEBOOK_API_VERSION: "{{ EDXAPP_FACEBOOK_API_VERSION }}"

generic_cache_config: &default_generic_cache
  BACKEND:  'django.core.cache.backends.memcached.MemcachedCache'
  KEY_FUNCTION:  'util.memcache.safe_key'

generic_env_config:  &edxapp_generic_env
  COURSE_CATALOG_VISIBILITY_PERMISSION: "{{ EDXAPP_COURSE_CATALOG_VISIBILITY_PERMISSION }}"
  COURSE_ABOUT_VISIBILITY_PERMISSION: "{{ EDXAPP_COURSE_ABOUT_VISIBILITY_PERMISSION }}"
  COUNTRIES_OVERRIDE: "{{ EDXAPP_COUNTRIES_OVERRIDE }}"
  ALL_LANGUAGES_OVERRIDE: "{{ EDXAPP_ALL_LANGUAGES_OVERRIDE }}"
  PASSWORD_MIN_LENGTH: "{{ EDXAPP_PASSWORD_MIN_LENGTH }}"
  PASSWORD_MAX_LENGTH: "{{ EDXAPP_PASSWORD_MAX_LENGTH }}"
  PASSWORD_COMPLEXITY: "{{ EDXAPP_PASSWORD_COMPLEXITY }}"
  ENFORCE_PASSWORD_POLICY: "{{ EDXAPP_ENFORCE_PASSWORD_POLICY }}"
  ECOMMERCE_PUBLIC_URL_ROOT: "{{ EDXAPP_ECOMMERCE_PUBLIC_URL_ROOT }}"
  ECOMMERCE_API_URL: "{{ EDXAPP_ECOMMERCE_API_URL }}"
  COURSE_CATALOG_API_URL: "{{ EDXAPP_COURSE_CATALOG_API_URL }}"
  FINANCIAL_REPORTS: "{{ EDXAPP_FINANCIAL_REPORTS }}"
  ONLOAD_BEACON_SAMPLE_RATE: "{{ EDXAPP_ONLOAD_BEACON_SAMPLE_RATE }}"
  CORS_ORIGIN_WHITELIST: "{{ EDXAPP_CORS_ORIGIN_WHITELIST }}"
  CORS_ORIGIN_ALLOW_ALL: "{{ EDXAPP_CORS_ORIGIN_ALLOW_ALL }}"
  CROSS_DOMAIN_CSRF_COOKIE_DOMAIN: "{{ EDXAPP_CROSS_DOMAIN_CSRF_COOKIE_DOMAIN }}"
  CROSS_DOMAIN_CSRF_COOKIE_NAME: "{{ EDXAPP_CROSS_DOMAIN_CSRF_COOKIE_NAME }}"
  CSRF_COOKIE_SECURE: "{{ EDXAPP_CSRF_COOKIE_SECURE  }}"
  VIDEO_UPLOAD_PIPELINE: "{{ EDXAPP_VIDEO_UPLOAD_PIPELINE }}"
  DEPRECATED_ADVANCED_COMPONENT_TYPES: "{{ EDXAPP_DEPRECATED_ADVANCED_COMPONENT_TYPES }}"
  OAUTH_OIDC_ISSUER: "{{ EDXAPP_LMS_ISSUER }}"
  XBLOCK_FS_STORAGE_BUCKET: "{{ EDXAPP_XBLOCK_FS_STORAGE_BUCKET }}"
  XBLOCK_FS_STORAGE_PREFIX: "{{ EDXAPP_XBLOCK_FS_STORAGE_PREFIX }}"
  X_FRAME_OPTIONS: "{{ EDXAPP_X_FRAME_OPTIONS }}"
  ANALYTICS_DATA_URL: "{{ EDXAPP_ANALYTICS_DATA_URL }}"
  ANALYTICS_DASHBOARD_URL: '{{ EDXAPP_ANALYTICS_DASHBOARD_URL }}'
  API_COOKIE_URL: "{{ EDXAPP_API_COOKIE_URL }}"
  CELERY_BROKER_VHOST: "{{ EDXAPP_CELERY_BROKER_VHOST }}"
  CELERY_BROKER_USE_SSL: "{{ EDXAPP_CELERY_BROKER_USE_SSL }}"
  PAYMENT_SUPPORT_EMAIL: "{{ EDXAPP_PAYMENT_SUPPORT_EMAIL }}"
  ZENDESK_URL: "{{ EDXAPP_ZENDESK_URL }}"
  ZENDESK_CUSTOM_FIELDS: "{{ EDXAPP_ZENDESK_CUSTOM_FIELDS }}"
  COURSES_WITH_UNSAFE_CODE: "{{ EDXAPP_COURSES_WITH_UNSAFE_CODE }}"
  BULK_EMAIL_EMAILS_PER_TASK: "{{ EDXAPP_BULK_EMAIL_EMAILS_PER_TASK }}"
  MICROSITE_ROOT_DIR: "{{ EDXAPP_MICROSITE_ROOT_DIR }}"
  MICROSITE_CONFIGURATION: "{{ EDXAPP_MICROSITE_CONFIGURATION }}"
  DEFAULT_FILE_STORAGE:  "{{ EDXAPP_DEFAULT_FILE_STORAGE }}"
  GRADES_DOWNLOAD:
    STORAGE_CLASS: "{{ EDXAPP_GRADE_STORAGE_CLASS | default(None) }}"
    STORAGE_KWARGS: "{{ EDXAPP_GRADE_STORAGE_KWARGS | default(None) }}"
    STORAGE_TYPE: "{{ EDXAPP_GRADE_STORAGE_TYPE | default(None) }}"
    BUCKET: "{{ EDXAPP_GRADE_BUCKET | default(None) }}"
    ROOT_PATH: "{{ EDXAPP_GRADE_ROOT_PATH | default(None) }}"
    CONTAINER: "{{ EDXAPP_GRADE_STORAGE_CONTAINER | default(None) }}"
  STATIC_URL_BASE: "{{ EDXAPP_STATIC_URL_BASE }}"
  STATIC_ROOT_BASE: "{{ edxapp_staticfile_dir }}"
  LMS_BASE: "{{ EDXAPP_LMS_BASE }}"
  CMS_BASE: "{{ EDXAPP_CMS_BASE }}"
  LMS_ROOT_URL: "{{ EDXAPP_LMS_ROOT_URL }}"
  BOOK_URL:  "{{ EDXAPP_BOOK_URL }}"
  PARTNER_SUPPORT_EMAIL: "{{ EDXAPP_PARTNER_SUPPORT_EMAIL }}"
  PLATFORM_NAME: "{{ EDXAPP_PLATFORM_NAME }}"
  STUDIO_NAME: "{{ EDXAPP_STUDIO_NAME }}"
  STUDIO_SHORT_NAME: "{{ EDXAPP_STUDIO_SHORT_NAME }}"
  CERT_QUEUE:  'certificates'
  LOCAL_LOGLEVEL: "{{ EDXAPP_LOG_LEVEL }}"
  # default email backed set to local SMTP
  EMAIL_BACKEND: "{{ EDXAPP_EMAIL_BACKEND }}"
  EMAIL_HOST: "{{ EDXAPP_EMAIL_HOST }}"
  EMAIL_PORT: "{{ EDXAPP_EMAIL_PORT }}"
  EMAIL_USE_TLS: "{{ EDXAPP_EMAIL_USE_TLS }}"
  AWS_SES_REGION_NAME: "{{ EDXAPP_AWS_SES_REGION_NAME }}"
  AWS_SES_REGION_ENDPOINT: "{{ EDXAPP_AWS_SES_REGION_ENDPOINT }}"
  FEATURES: "{{ EDXAPP_FEATURES }}"
  WIKI_ENABLED: true
  SYSLOG_SERVER:  "{{ EDXAPP_SYSLOG_SERVER }}"
  LOG_DIR:  "{{ COMMON_DATA_DIR }}/logs/edx"
  JWT_ISSUER: "{{ EDXAPP_LMS_ISSUER }}"
  JWT_EXPIRATION: '{{ EDXAPP_JWT_EXPIRATION }}'
  JWT_AUTH:
    JWT_ISSUER: "{{ EDXAPP_LMS_ISSUER }}"
    JWT_AUDIENCE: "{{ EDXAPP_JWT_AUDIENCE }}"
    JWT_SECRET_KEY: "{{ EDXAPP_JWT_SECRET_KEY }}"

  #must end in slash (https://docs.djangoproject.com/en/1.4/ref/settings/#media-url)
  MEDIA_URL:  "{{ EDXAPP_MEDIA_URL }}/"
  MEDIA_ROOT: "{{ edxapp_media_dir }}/"

  ANALYTICS_SERVER_URL:  "{{ EDXAPP_ANALYTICS_SERVER_URL }}"
  FEEDBACK_SUBMISSION_EMAIL: "{{ EDXAPP_FEEDBACK_SUBMISSION_EMAIL }}"
  TIME_ZONE: "{{ EDXAPP_TIME_ZONE }}"
  LANGUAGE_CODE: "{{ EDXAPP_LANGUAGE_CODE }}"
  MKTG_URL_LINK_MAP: "{{ EDXAPP_MKTG_URL_LINK_MAP }}"
  MKTG_URLS: "{{ EDXAPP_MKTG_URLS }}"
  SUPPORT_SITE_LINK: "{{ EDXAPP_SUPPORT_SITE_LINK }}"
  CDN_VIDEO_URLS: "{{ CDN_VIDEO_URLS }}"
  PERFORMANCE_GRAPHITE_URL: "{{ PERFORMANCE_GRAPHITE_URL }}"

  # repo root for courses
  GITHUB_REPO_ROOT: "{{ edxapp_course_data_dir }}"
  CACHES:
    default:
      <<: *default_generic_cache
      KEY_PREFIX: 'default'
      LOCATION: "{{ EDXAPP_MEMCACHE }}"
      VERSION: "{{ EDXAPP_DEFAULT_CACHE_VERSION }}"
    general:
      <<: *default_generic_cache
      KEY_PREFIX:  'general'
      LOCATION: "{{ EDXAPP_MEMCACHE }}"
    mongo_metadata_inheritance:
      <<: *default_generic_cache
      KEY_PREFIX:  'mongo_metadata_inheritance'
      TIMEOUT: 300
      LOCATION: "{{ EDXAPP_MEMCACHE }}"
    staticfiles:
      <<: *default_generic_cache
      KEY_PREFIX: "{{ ansible_hostname|default('staticfiles') }}_general"
      LOCATION: "{{ EDXAPP_MEMCACHE }}"
    configuration:
      <<: *default_generic_cache
      KEY_PREFIX: "{{ ansible_hostname|default('configuration') }}"
      LOCATION: "{{ EDXAPP_MEMCACHE }}"
    celery:
      <<: *default_generic_cache
      KEY_PREFIX:  'celery'
      LOCATION: "{{ EDXAPP_MEMCACHE }}"
      TIMEOUT: "7200"
    course_structure_cache:
      <<: *default_generic_cache
      KEY_PREFIX: 'course_structure'
      LOCATION: "{{ EDXAPP_CACHE_COURSE_STRUCTURE_MEMCACHE }}"
      # Default to two hours
      TIMEOUT: "7200"
  CELERY_BROKER_TRANSPORT: 'amqp'
  CELERY_BROKER_HOSTNAME: "{{ EDXAPP_RABBIT_HOSTNAME }}"
  COMMENTS_SERVICE_URL: "{{ EDXAPP_COMMENTS_SERVICE_URL }}"
  LOGGING_ENV: "{{ EDXAPP_LOGGING_ENV }}"
  SESSION_COOKIE_DOMAIN:  "{{ EDXAPP_SESSION_COOKIE_DOMAIN }}"
  SESSION_COOKIE_NAME:  "{{ EDXAPP_SESSION_COOKIE_NAME }}"
  COMMENTS_SERVICE_KEY: "{{ EDXAPP_COMMENTS_SERVICE_KEY }}"
  THEME_NAME: "{{ edxapp_theme_name }}"
  TECH_SUPPORT_EMAIL: "{{ EDXAPP_TECH_SUPPORT_EMAIL }}"
  CONTACT_EMAIL: "{{ EDXAPP_CONTACT_EMAIL }}"
  BUGS_EMAIL: "{{ EDXAPP_BUGS_EMAIL }}"
  DEFAULT_FROM_EMAIL: "{{ EDXAPP_DEFAULT_FROM_EMAIL }}"
  DEFAULT_FEEDBACK_EMAIL: "{{ EDXAPP_DEFAULT_FEEDBACK_EMAIL }}"
  SERVER_EMAIL: "{{ EDXAPP_DEFAULT_SERVER_EMAIL }}"
  BULK_EMAIL_DEFAULT_FROM_EMAIL: "{{ EDXAPP_BULK_EMAIL_DEFAULT_FROM_EMAIL }}"
  BULK_EMAIL_LOG_SENT_EMAILS: "{{ EDXAPP_BULK_EMAIL_LOG_SENT_EMAILS }}"
  CAS_SERVER_URL: "{{ EDXAPP_CAS_SERVER_URL }}"
  CAS_EXTRA_LOGIN_PARAMS: "{{ EDXAPP_CAS_EXTRA_LOGIN_PARAMS }}"
  CAS_ATTRIBUTE_CALLBACK: "{{ EDXAPP_CAS_ATTRIBUTE_CALLBACK }}"
  UNIVERSITY_EMAIL: "{{ EDXAPP_UNIVERSITY_EMAIL }}"
  PRESS_EMAIL: "{{ EDXAPP_PRESS_EMAIL }}"
  SOCIAL_MEDIA_FOOTER_URLS: "{{ EDXAPP_SOCIAL_MEDIA_FOOTER_URLS }}"
  MOBILE_STORE_URLS: "{{ EDXAPP_MOBILE_STORE_URLS }}"
  FOOTER_ORGANIZATION_IMAGE: "{{ EDXAPP_FOOTER_ORGANIZATION_IMAGE }}"
  ORA2_FILE_PREFIX: "{{ EDXAPP_ORA2_FILE_PREFIX }}"
  FILE_UPLOAD_STORAGE_BUCKET_NAME: "{{ EDXAPP_FILE_UPLOAD_STORAGE_BUCKET_NAME }}"
  FILE_UPLOAD_STORAGE_PREFIX: "{{ EDXAPP_FILE_UPLOAD_STORAGE_PREFIX }}"
  VIRTUAL_UNIVERSITIES: "{{ EDXAPP_VIRTUAL_UNIVERSITIES }}"
  REGISTRATION_EXTRA_FIELDS: "{{ EDXAPP_REGISTRATION_EXTRA_FIELDS }}"
  XBLOCK_SETTINGS: "{{ EDXAPP_XBLOCK_SETTINGS }}"
  EDXMKTG_USER_INFO_COOKIE_NAME: "{{ EDXAPP_EDXMKTG_USER_INFO_COOKIE_NAME }}"

  # Deprecated, maintained for backward compatibility
  COMPREHENSIVE_THEME_DIR: "{{ EDXAPP_COMPREHENSIVE_THEME_DIR }}"

  COMPREHENSIVE_THEME_DIRS: "{{ EDXAPP_COMPREHENSIVE_THEME_DIRS }}"
  COMPREHENSIVE_THEME_LOCALE_PATHS: "{{ EDXAPP_COMPREHENSIVE_THEME_LOCALE_PATHS }}"
  ENABLE_COMPREHENSIVE_THEMING: "{{ EDXAPP_ENABLE_COMPREHENSIVE_THEMING }}"
  DEFAULT_SITE_THEME: "{{ EDXAPP_DEFAULT_SITE_THEME }}"
  SESSION_SAVE_EVERY_REQUEST: "{{ EDXAPP_SESSION_SAVE_EVERY_REQUEST }}"
  SOCIAL_SHARING_SETTINGS: "{{ EDXAPP_SOCIAL_SHARING_SETTINGS }}"
  SESSION_COOKIE_SECURE: "{{ EDXAPP_SESSION_COOKIE_SECURE }}"
  CODE_JAIL:
    # from https://github.com/edx/codejail/blob/master/codejail/django_integration.py#L24, '' should be same as None
    python_bin: '{% if EDXAPP_PYTHON_SANDBOX %}{{ edxapp_sandbox_venv_dir }}/bin/python{% endif %}'
    limits: "{{ EDXAPP_CODE_JAIL_LIMITS }}"
    user: '{{ edxapp_sandbox_user }}'
  AFFILIATE_COOKIE_NAME: "{{ EDXAPP_AFFILIATE_COOKIE_NAME }}"
  ELASTIC_SEARCH_CONFIG: "{{ EDXAPP_ELASTIC_SEARCH_CONFIG }}"
  PLATFORM_TWITTER_ACCOUNT: "{{ EDXAPP_PLATFORM_TWITTER_ACCOUNT }}"
  PLATFORM_FACEBOOK_ACCOUNT: "{{ EDXAPP_PLATFORM_FACEBOOK_ACCOUNT }}"

lms_auth_config:
  <<: *edxapp_generic_auth
  SEGMENT_KEY: "{{ EDXAPP_LMS_SEGMENT_KEY }}"
  OPTIMIZELY_PROJECT_ID: "{{ EDXAPP_OPTIMIZELY_PROJECT_ID }}"
  EDX_API_KEY: "{{ EDXAPP_EDX_API_KEY }}"
  VERIFY_STUDENT: "{{ EDXAPP_VERIFY_STUDENT }}"
  GOOGLE_ANALYTICS_LINKEDIN: "{{ EDXAPP_GOOGLE_ANALYTICS_LINKEDIN }}"
  CC_PROCESSOR_NAME: "{{ EDXAPP_CC_PROCESSOR_NAME }}"
  CC_PROCESSOR: "{{ EDXAPP_CC_PROCESSOR }}"
  TRACKING_SEGMENTIO_WEBHOOK_SECRET: "{{ EDXAPP_TRACKING_SEGMENTIO_WEBHOOK_SECRET }}"
  PROFILE_IMAGE_SECRET_KEY: "{{ EDXAPP_PROFILE_IMAGE_SECRET_KEY }}"
  MODULESTORE:
    default:
        ENGINE: 'xmodule.modulestore.mixed.MixedModuleStore'
        OPTIONS:
          mappings: {}
          stores:
            - NAME: 'split'
              ENGINE: 'xmodule.modulestore.split_mongo.split_draft.DraftVersioningModuleStore'
              DOC_STORE_CONFIG: "{{ EDXAPP_LMS_SPLIT_DOC_STORE_CONFIG }}"
              OPTIONS:
                default_class: 'xmodule.hidden_module.HiddenDescriptor'
                fs_root:  "{{ edxapp_course_data_dir }}"
                render_template: 'edxmako.shortcuts.render_to_string'
            - NAME: 'draft'
              ENGINE: 'xmodule.modulestore.mongo.DraftMongoModuleStore'
              DOC_STORE_CONFIG: "{{ EDXAPP_LMS_DRAFT_DOC_STORE_CONFIG }}"
              OPTIONS:
                default_class: 'xmodule.hidden_module.HiddenDescriptor'
                fs_root:  "{{ edxapp_course_data_dir }}"
                render_template: 'edxmako.shortcuts.render_to_string'
  PROCTORING_BACKEND_PROVIDER: "{{ EDXAPP_PROCTORING_BACKEND_PROVIDER }}"
  SOCIAL_AUTH_OAUTH_SECRETS: "{{ EDXAPP_SOCIAL_AUTH_OAUTH_SECRETS }}"


lms_env_config:
  <<: *edxapp_generic_env
  OAUTH_ENFORCE_SECURE: "{{ EDXAPP_OAUTH_ENFORCE_SECURE }}"
  OAUTH_EXPIRE_CONFIDENTIAL_CLIENT_DAYS: "{{ EDXAPP_OAUTH_EXPIRE_CONFIDENTIAL_CLIENT_DAYS }}"
  OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS: "{{ EDXAPP_OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS }}"
  PAID_COURSE_REGISTRATION_CURRENCY: "{{ EDXAPP_PAID_COURSE_REGISTRATION_CURRENCY }}"
  GIT_REPO_DIR: "{{ EDXAPP_GIT_REPO_DIR }}"
  SITE_NAME:  "{{ EDXAPP_LMS_SITE_NAME }}"
  VIDEO_CDN_URL: "{{ EDXAPP_VIDEO_CDN_URLS }}"
  PDF_RECEIPT_TAX_ID: "{{ EDXAPP_PDF_RECEIPT_TAX_ID }}"
  PDF_RECEIPT_FOOTER_TEXT: "{{ EDXAPP_PDF_RECEIPT_FOOTER_TEXT }}"
  PDF_RECEIPT_DISCLAIMER_TEXT: "{{ EDXAPP_PDF_RECEIPT_DISCLAIMER_TEXT }}"
  PDF_RECEIPT_BILLING_ADDRESS: "{{ EDXAPP_PDF_RECEIPT_BILLING_ADDRESS }}"
  PDF_RECEIPT_TERMS_AND_CONDITIONS: "{{ EDXAPP_PDF_RECEIPT_TERMS_AND_CONDITIONS }}"
  PDF_RECEIPT_TAX_ID_LABEL: "{{ EDXAPP_PDF_RECEIPT_TAX_ID_LABEL }}"
  PDF_RECEIPT_COBRAND_LOGO_PATH: "{{ EDXAPP_PDF_RECEIPT_COBRAND_LOGO_PATH }}"
  PDF_RECEIPT_LOGO_PATH: "{{ EDXAPP_PDF_RECEIPT_LOGO_PATH }}"
  PROFILE_IMAGE_BACKEND: "{{ EDXAPP_PROFILE_IMAGE_BACKEND }}"
  PROFILE_IMAGE_MIN_BYTES: "{{ EDXAPP_PROFILE_IMAGE_MIN_BYTES }}"
  PROFILE_IMAGE_MAX_BYTES: "{{ EDXAPP_PROFILE_IMAGE_MAX_BYTES }}"
  EDXNOTES_PUBLIC_API: "{{ EDXAPP_EDXNOTES_PUBLIC_API }}"
  EDXNOTES_INTERNAL_API: "{{ EDXAPP_EDXNOTES_INTERNAL_API }}"
  RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS: "{{ EDXAPP_RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS }}"
  RETRY_ACTIVATION_EMAIL_TIMEOUT: "{{ EDXAPP_RETRY_ACTIVATION_EMAIL_TIMEOUT }}"
  LTI_USER_EMAIL_DOMAIN: "{{ EDXAPP_LTI_USER_EMAIL_DOMAIN }}"
  LTI_AGGREGATE_SCORE_PASSBACK_DELAY: "{{ EDXAPP_LTI_AGGREGATE_SCORE_PASSBACK_DELAY }}"
  PROCTORING_SETTINGS: "{{ EDXAPP_PROCTORING_SETTINGS }}"
  CREDIT_HELP_LINK_URL: "{{ EDXAPP_CREDIT_HELP_LINK_URL }}"
  MAILCHIMP_NEW_USER_LIST_ID: "{{ EDXAPP_MAILCHIMP_NEW_USER_LIST_ID }}"
  CONTACT_MAILING_ADDRESS: "{{ EDXAPP_CONTACT_MAILING_ADDRESS }}"
  AUDIT_CERT_CUTOFF_DATE: "{{ EDXAPP_AUDIT_CERT_CUTOFF_DATE }}"
  API_ACCESS_MANAGER_EMAIL: "{{ EDXAPP_API_ACCESS_MANAGER_EMAIL }}"
  API_ACCESS_FROM_EMAIL: "{{ EDXAPP_API_ACCESS_FROM_EMAIL }}"
  API_DOCUMENTATION_URL: "{{ EDXAPP_API_DOCUMENTATION_URL }}"
  AUTH_DOCUMENTATION_URL: "{{ EDXAPP_AUTH_DOCUMENTATION_URL }}"
  DOC_LINK_BASE_URL: "{{ EDXAPP_LMS_DOC_LINK_BASE_URL }}"
  RECALCULATE_GRADES_ROUTING_KEY: "{{ EDXAPP_RECALCULATE_GRADES_ROUTING_KEY }}"
  CELERY_QUEUES: "{{ EDXAPP_LMS_CELERY_QUEUES }}"
  ALTERNATE_WORKER_QUEUES: "cms"
  LMS_ALLOWED_HOSTS: "{{ EDXAPP_LMS_ALLOWED_HOSTS }}"

cms_auth_config:
  <<: *edxapp_generic_auth
  SEGMENT_KEY: "{{ EDXAPP_CMS_SEGMENT_KEY }}"
  MODULESTORE:
    default:
        ENGINE: 'xmodule.modulestore.mixed.MixedModuleStore'
        OPTIONS:
          mappings: {}
          stores:
            - NAME: 'split'
              ENGINE: 'xmodule.modulestore.split_mongo.split_draft.DraftVersioningModuleStore'
              DOC_STORE_CONFIG: "{{ EDXAPP_CMS_DOC_STORE_CONFIG }}"
              OPTIONS:
                default_class: 'xmodule.hidden_module.HiddenDescriptor'
                fs_root:  "{{ edxapp_course_data_dir }}"
                render_template: 'edxmako.shortcuts.render_to_string'
            - NAME: 'draft'
              ENGINE: 'xmodule.modulestore.mongo.DraftMongoModuleStore'
              DOC_STORE_CONFIG: "{{ EDXAPP_CMS_DOC_STORE_CONFIG }}"
              OPTIONS:
                default_class: 'xmodule.hidden_module.HiddenDescriptor'
                fs_root:  "{{ edxapp_course_data_dir }}"
                render_template: 'edxmako.shortcuts.render_to_string'
  PARSE_KEYS: "{{ EDXAPP_PARSE_KEYS }}"

cms_env_config:
  <<: *edxapp_generic_env
  SITE_NAME:  "{{ EDXAPP_CMS_SITE_NAME }}"
  GIT_REPO_EXPORT_DIR: "{{ EDXAPP_GIT_REPO_EXPORT_DIR }}"
  DOC_LINK_BASE_URL: "{{ EDXAPP_CMS_DOC_LINK_BASE_URL }}"
  CELERY_QUEUES: "{{ EDXAPP_CMS_CELERY_QUEUES }}"
  RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS: "{{ EDXAPP_RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS }}"
  RETRY_ACTIVATION_EMAIL_TIMEOUT: "{{ EDXAPP_RETRY_ACTIVATION_EMAIL_TIMEOUT }}"
  ENABLE_MULTI_SITE_VIEWLIVE_DROPDOWN: "{{ EDXAPP_ENABLE_MULTI_SITE_VIEWLIVE_DROPDOWN }}"
  ALTERNATE_WORKER_QUEUES: "lms"
  COURSE_IMPORT_EXPORT_BUCKET: "{{ EDXAPP_IMPORT_EXPORT_BUCKET }}"
  CMS_ALLOWED_HOSTS: "{{ EDXAPP_CMS_ALLOWED_HOSTS }}"

# install dir for the edx-platform repo
edxapp_code_dir: "{{ edxapp_app_dir }}/edx-platform"

# gunicorn ports/hosts, these shouldn't need to be overridden
edxapp_cms_gunicorn_port: 8010
edxapp_cms_gunicorn_host: 127.0.0.1
edxapp_lms_gunicorn_port: 8000
edxapp_lms_gunicorn_host: 127.0.0.1
edxapp_lms_preview_gunicorn_port: 8000

# These vars are for creating the application json config
# files.  There are two for each service that uses the
# 'edx-platform' code.  Defining them will create the upstart
# job.  It will also enable the corresponding section in the
# 'edxapp' upstart job.

service_variants_enabled:
  - lms
  - cms

#Number of gunicorn worker processes to spawn, as a multiplier to number of virtual cores
worker_core_mult:
  lms: 4
  cms: 2

# Stanford-style Theming
# Turn theming on and off with edxapp_use_custom_theme
# Set theme name with edxapp_theme_name
# Stanford, for example, uses edxapp_theme_name: 'stanford'
#
# TODO: change variables to ALL-CAPS, since they are meant to be externally overridden
edxapp_use_custom_theme: false
edxapp_theme_name: ""
edxapp_theme_source_repo: 'https://{{ COMMON_GIT_MIRROR }}/Stanford-Online/edx-theme.git'
edxapp_theme_version: 'master'

# make this the public URL instead of writable
edx_platform_repo: "https://{{ COMMON_GIT_MIRROR }}/edx/edx-platform.git"
# `edx_platform_version` can be anything that git recognizes as a commit
# reference, including a tag, a branch name, or a commit hash
edx_platform_version: 'release'
pre_requirements_file:    "{{ edxapp_code_dir }}/requirements/edx/pre.txt"
github_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/github.txt"
custom_requirements_file:   "{{ edxapp_code_dir }}/requirements/edx/custom.txt"
local_requirements_file:  "{{ edxapp_code_dir }}/requirements/edx/local.txt"
base_requirements_file:   "{{ edxapp_code_dir }}/requirements/edx/base.txt"
post_requirements_file:   "{{ edxapp_code_dir }}/requirements/edx/post.txt"
paver_requirements_file:   "{{ edxapp_code_dir }}/requirements/edx/paver.txt"
private_requirements_file:   "{{ edxapp_code_dir }}/requirements/edx/edx-private.txt"

sandbox_base_requirements:  "{{ edxapp_code_dir }}/requirements/edx-sandbox/base.txt"
sandbox_local_requirements: "{{ edxapp_code_dir }}/requirements/edx-sandbox/local.txt"
sandbox_post_requirements:  "{{ edxapp_code_dir }}/requirements/edx-sandbox/post.txt"

# The Python requirements files in the order they should be installed.  This order should
# match the order of PYTHON_REQ_FILES in edx-platform/pavelib/prereqs.py.  (Also check the
# edx-solutions fork of edx-platform when if you consider reordering this list.)
# private_requirements_file is not included in this list, since it is only installed
# conditionally based on the value of EDXAPP_INSTALL_PRIVATE_REQUIREMENTS.
edxapp_requirements_files:
  - "{{ pre_requirements_file }}"
  - "{{ github_requirements_file }}"
  - "{{ custom_requirements_file }}"
  - "{{ local_requirements_file }}"
  - "{{ base_requirements_file }}"
  - "{{ post_requirements_file }}"
  - "{{ paver_requirements_file }}"

# All edxapp requirements files potentially containing Github URLs.  When using a custom
# Github mirror, occurrences of "github.com" are replaced by the custom mirror in these
# files.
edxapp_requirements_with_github_urls:
  - "{{ pre_requirements_file }}"
  - "{{ github_requirements_file }}"
  - "{{ custom_requirements_file }}"
  - "{{ base_requirements_file }}"
  - "{{ post_requirements_file }}"
  - "{{ paver_requirements_file }}"
  - "{{ private_requirements_file }}"
  - "{{ sandbox_post_requirements }}"
  - "{{ sandbox_local_requirements }}"
  - "{{ sandbox_base_requirements }}"

edxapp_chrislea_ppa: "ppa:chris-lea/node.js"

edxapp_debian_pkgs:
  # for compiling the virtualenv
  # (only needed if wheel files aren't available)
  - s3cmd
  - pkg-config
  # for scipy, do not install
  # libopenblas-base, it will cause
  # problems for numpy
  - g++
  # apparmor
  - apparmor-utils
  # misc
  - curl
  - ipython
  - nodejs
  - ntp
  # matplotlib needs libfreetype6-dev
  - libfreetype6-dev
  # cffi needs libffi-dev
  - libffi-dev
  - python-dev
  - libsqlite3-dev

# Deploy Specific Vars
edxapp_lms_variant: lms
edxapp_cms_variant: cms

# Worker Settings
worker_django_settings_module: '{{ EDXAPP_SETTINGS }}'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



