---

# Application settings.
virtualenv_path: "/webapps/{{ application_name }}"
project_path: "{{ virtualenv_path }}/{{ project_name }}"
application_log_dir: "{{ virtualenv_path }}/logs"
application_log_file: "{{ application_log_dir }}/gunicorn_supervisor.log"
requirements_file: "{{ project_path }}/requirements.txt"


# Gunicorn settings.
gunicorn_user: "{{ application_name }}"
gunicorn_group: webapps


# Nginx settings.
nginx_access_log_file: "{{ application_log_dir }}/nginx_access.log"
nginx_error_log_file: "{{ application_log_dir }}/nginx_error.log"
nginx_static_dir: "{{ virtualenv_path }}/static/"
nginx_media_dir: "{{ virtualenv_path }}/media/"


# Django environment variables.
django_environment:
  DJANGO_SETTINGS_MODULE: "{{ django_settings_file }}"
  DJANGO_SECRET_KEY: "{{ django_secret_key }}"
  MEDIA_ROOT: "{{ nginx_media_dir }}"
  STATIC_ROOT: "{{ nginx_static_dir }}"
  DATABASE_USER: "{{ db_user }}"
  DATABASE_PASSWORD: "{{ db_password }}"
  EMAIL_HOST: "{{ email_host|default(omit) }}"
  EMAIL_HOST_USER: "{{ email_host_user|default(omit) }}"
  EMAIL_HOST_PASSWORD: "{{ email_host_password|default(omit) }}"
  BROKER_URL: "{{ broker_url|default(omit) }}"

---

# Application settings.
virtualenv_path: "/webapps/{{ application_name }}"
project_path: "{{ virtualenv_path }}/{{ project_name }}"
application_log_dir: "{{ virtualenv_path }}/logs"
application_log_file: "{{ application_log_dir }}/gunicorn_supervisor.log"
requirements_file: "{{ project_path }}/requirements.txt"


# Gunicorn settings.
gunicorn_user: "{{ application_name }}"
gunicorn_group: webapps


# Nginx settings.
nginx_access_log_file: "{{ application_log_dir }}/nginx_access.log"
nginx_error_log_file: "{{ application_log_dir }}/nginx_error.log"
nginx_static_dir: "{{ virtualenv_path }}/static/"
nginx_media_dir: "{{ virtualenv_path }}/media/"


# Django environment variables.
django_environment:
  DJANGO_SETTINGS_MODULE: "{{ django_settings_file }}"
  DJANGO_SECRET_KEY: "{{ django_secret_key }}"
  MEDIA_ROOT: "{{ nginx_media_dir }}"
  STATIC_ROOT: "{{ nginx_static_dir }}"
  DATABASE_USER: "{{ db_user }}"
  DATABASE_PASSWORD: "{{ db_password }}"
  BROKER_URL: "{{ broker_url }}"

Remove erroneous usage of default(omit)
Remove erroneous usage of default(omit)

Unfortunately, `default(omit)` "is a hack that applies only to the
argument 4 passed to a module."
  (https://github.com/ansible/ansible/issues/14130)

This pattern creates problems for the postactivate script as well as any
usage of `environment: "{{ django_environment }}"` as any omitted
variables will be set to "__omit_place_holder__<token>"
