
These configuration options allow for the API to require authentication before accepting read or write requests [1]. [1]: https://ara.readthedocs.io/en/feature-1.0/api-security.html Change-Id: I130631b52b6532e3e7cc559d700055a687d257b7
169 lines
6.0 KiB
YAML
169 lines
6.0 KiB
YAML
---
|
||
# Copyright (c) 2019 Red Hat, Inc.
|
||
#
|
||
# This file is part of ARA Records Ansible.
|
||
#
|
||
# ARA Records Ansible is free software: you can redistribute it and/or modify
|
||
# it under the terms of the GNU General Public License as published by
|
||
# the Free Software Foundation, either version 3 of the License, or
|
||
# (at your option) any later version.
|
||
#
|
||
# ARA Records Ansible is distributed in the hope that it will be useful,
|
||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
# GNU General Public License for more details.
|
||
#
|
||
# You should have received a copy of the GNU General Public License
|
||
# along with ARA Records Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||
|
||
# Root directory where every file for the ARA installation are located
|
||
ara_api_root_dir: "{{ ansible_user_dir }}/.ara"
|
||
|
||
# Directory where logs are written to
|
||
ara_api_log_dir: "{{ ara_api_root_dir }}/logs"
|
||
|
||
# Whether or not ara should be installed in a virtual environment.
|
||
# This defaults to true to prevent conflicting with system or distribution
|
||
# python packages.
|
||
ara_api_venv: true
|
||
|
||
# When using a virtualenv, path to where it will be installed
|
||
ara_api_venv_path: "{{ ara_api_root_dir }}/virtualenv"
|
||
|
||
# How ARA will be installed
|
||
# - source [default]: installs from a local or remote git repository
|
||
# - pypi [planned]: installs from pypi
|
||
ara_api_install_method: source
|
||
|
||
# When installing from source, the URL or filesystem path where the git source
|
||
# repository can be cloned from.
|
||
ara_api_source: "https://git.openstack.org/openstack/ara"
|
||
|
||
# When installing from source, location where the source repository will be checked out to.
|
||
ara_api_source_checkout: "{{ ara_api_root_dir }}/git/ara"
|
||
|
||
# Version of ARA to install
|
||
# When installing from source, this can be a git ref (tag, branch, commit, etc)
|
||
# When installing from PyPi, it would be a version number that has been released.
|
||
# When using "latest" as the source version, HEAD will be used
|
||
# When using "latest" as the pypi version, the latest release will be used
|
||
ara_api_version: feature/1.0
|
||
|
||
# The frontend/web server for serving the ARA API
|
||
# It is recommended to specify a web server when deploying a production environment.
|
||
# - null [default]: No frontend server will be set up.
|
||
# - nginx: Nginx will be configured in front of the WSGI application server.
|
||
# - apache [planned]
|
||
ara_api_frontend_server: null
|
||
|
||
# Path to a custom vhost configuration jinja template
|
||
# The vhost configuration templates provided by the role are simple by design
|
||
# and are not sufficient to cover every use cases.
|
||
# Use this variable if you need to have your own custom nginx or apache configuration.
|
||
ara_api_frontend_vhost: null
|
||
|
||
# The WSGI server for running ARA's API server
|
||
# - null [default]: No persistent WSGI application server will be set up. Only the offline API client will work.
|
||
# - gunicorn: gunicorn will be installed and set up to run the API as a systemd service.
|
||
# - mod_wsgi [planned]
|
||
ara_api_wsgi_server: null
|
||
|
||
# Address and port on which the wsgi server will bind
|
||
# Changing this value means you might need to adjust "ara_api_allowed_hosts" and
|
||
# "ara_api_cors_origin_whitelist".
|
||
ara_api_wsgi_bind: "127.0.0.1:8000"
|
||
|
||
# When using a frontend server, the domain it will be listening on
|
||
ara_api_fqdn: "{{ ansible_default_ipv4['address'] }}"
|
||
|
||
####################################
|
||
# ara API configuration settings
|
||
# For more information, see documentation: https://ara.readthedocs.io
|
||
####################################
|
||
|
||
# ARA_BASE_DIR - Default directory for storing data and configuration
|
||
ara_api_base_dir: "{{ ara_api_root_dir }}/server"
|
||
|
||
# ARA_SETTINGS - Path to an ARA API configuration file
|
||
ara_api_settings: "{{ ara_api_base_dir }}/settings.yaml"
|
||
|
||
# ARA_ENV - Environment to load configuration for
|
||
ara_api_env: default
|
||
|
||
# ARA_READ_LOGIN_REQUIRED - Whether authentication is required for reading data
|
||
ara_api_read_login_required: false
|
||
|
||
# ARA_WRITE_LOGIN_REQUIRED - Whether authentication is required for writing data
|
||
ara_api_write_login_required: false
|
||
|
||
# ARA_LOG_LEVEL - Log level of the different components
|
||
ara_api_log_level: INFO
|
||
|
||
# ARA_LOGGING - Python logging configuration
|
||
ara_api_logging:
|
||
disable_existing_loggers: false
|
||
formatters:
|
||
normal:
|
||
format: '%(asctime)s %(levelname)s %(name)s: %(message)s'
|
||
handlers:
|
||
console:
|
||
class: logging.handlers.TimedRotatingFileHandler
|
||
formatter: normal
|
||
level: "{{ ara_api_log_level }}"
|
||
filename: "{{ ara_api_log_dir }}/server.log"
|
||
when: 'midnight'
|
||
interval: 1
|
||
backupCount: 30
|
||
loggers:
|
||
ara:
|
||
handlers:
|
||
- console
|
||
level: "{{ ara_api_log_level }}"
|
||
propagate: 0
|
||
root:
|
||
handlers:
|
||
- console
|
||
level: "{{ ara_api_log_level }}"
|
||
version: 1
|
||
|
||
# ARA_CORS_ORIGIN_ALLOW_ALL - django-cors-headers’s CORS_ORIGIN_WHITELIST_ALLOW_ALL setting
|
||
ara_api_cors_origin_allow_all: false
|
||
|
||
# ARA_CORS_ORIGIN_WHITELIST - django-cors-headers’s CORS_ORIGIN_WHITELIST setting
|
||
ara_api_cors_origin_whitelist:
|
||
- "127.0.0.1:8000"
|
||
- "localhost:3000"
|
||
|
||
# ARA_SERVER_ALLOWED_HOSTS - Django’s ALLOWED_HOSTS setting
|
||
ara_api_allowed_hosts:
|
||
- "127.0.0.1"
|
||
- "localhost"
|
||
- "::1"
|
||
- "{{ ansible_default_ipv4['address'] }}"
|
||
|
||
# ARA_DEBUG - Django's DEBUG setting
|
||
# It is not recommended to run with debug enabled in production.
|
||
ara_api_debug: false
|
||
|
||
# ARA_SECRET_KEY - Django's SECRET_KEY setting
|
||
# Note: If no key is provided, a random one will be generated once and persisted
|
||
ara_api_secret_key: null
|
||
|
||
# ARA_DATABASE_ENGINE - Django’s ENGINE database setting
|
||
ara_api_database_engine: django.db.backends.sqlite3
|
||
|
||
# ARA_DATABASE_NAME - Django’s NAME database setting
|
||
ara_api_database_name: "{{ ara_api_base_dir }}/ansible.sqlite"
|
||
|
||
# ARA_DATABASE_USER - Django’s USER database setting
|
||
ara_api_database_user: null
|
||
|
||
# ARA_DATABASE_PASSWORD - Django’s PASSWORD database setting
|
||
ara_api_database_password: null
|
||
|
||
# ARA_DATABASE_HOST - Django’s HOST database setting
|
||
ara_api_database_host: null
|
||
|
||
# ARA_DATABASE_PORT - Django’s PORT database setting
|
||
ara_api_database_port: null
|