ansible-role-searxng/defaults/main.yml

249 lines
12 KiB
YAML
Raw Permalink Normal View History

---
# Project source code URL: https://github.com/searxng/searxng
searxng_enabled: true
searxng_identifier: searxng
# Upstream doesn't release versioned images, so we have to stick with
# "latest" here.
searxng_version: latest
# The scheme with which SearXNG will be served.
searxng_scheme: "https"
# The hostname at which SearXNG is served.
searxng_hostname: ''
# The path at which SearXNG is served.
# This value must either be `/` or not end with a slash (e.g. `/searxng`).
searxng_path_prefix: /
# The base URL for the instance.
searxng_base_url: "{{ searxng_scheme }}://{{ searxng_hostname }}{{ searxng_path_prefix }}"
searxng_uid: ''
searxng_gid: ''
searxng_base_path: "/{{ searxng_identifier }}"
searxng_config_path: "{{ searxng_base_path }}/config"
searxng_container_image: "{{ searxng_container_image_registry_prefix }}searxng/searxng:{{ searxng_container_image_tag }}"
searxng_container_image_registry_prefix: docker.io/
searxng_container_image_tag: "{{ searxng_version }}"
searxng_container_image_force_pull: "{{ searxng_container_image.endswith(':latest') }}"
# The base container network. It will be auto-created by this role if it doesn't exist already.
searxng_container_network: "{{ searxng_identifier }}"
# A list of additional container networks that the container would be connected to.
# The role does not create these networks, so make sure they already exist.
# Use this to expose this container to another reverse proxy, which runs in a different container network.
searxng_container_additional_networks: "{{ searxng_container_additional_networks_auto + searxng_container_additional_networks_custom }}"
searxng_container_additional_networks_auto: []
searxng_container_additional_networks_custom: []
# The instance name.
searxng_instance_name: ''
# The autocomplete backend to use.
#
# Existing autocomplete backends: "dbpedia", "duckduckgo", "google", "yandex", "mwmbl",
# "seznam", "startpage", "stract", "swisscows", "qwant", "wikipedia".
#
# Leave blank to turn it off.
searxng_autocomplete: ''
# The secret key of this instance.
#
# You can generate a key using "openssl rand -hex 32".
searxng_secret_key: ''
# Whether to rate limit the number of requests on the instance.
#
# This can be disabled if you're running a private instance.
#
# Note that the rate limiter also requires a valkey database.
searxng_enable_rate_limiter: false
# When the rate limiter is enabled, you can provide extra
# configuration here.
#
# See https://github.com/searxng/searxng/blob/master/searx/limiter.toml
# for an example file.
searxng_rate_limiter_extra_configuration: ''
# When the rate limiter is enabled, you must also provide a valkey
# database.
searxng_rate_limiter_config_valkey_hostname: ''
# Whether to proxy image results through SearXNG.
searxng_enable_image_proxy: true
# Whether this is a public SearXNG instance.
searxng_public_instance: false
# You can provide extra configuration snippets here.
#
# See https://github.com/searxng/searxng/blob/master/searx/settings.yml
# for an example file.
searxng_extra_configuration_snippets: ''
# searxng_basic_auth_enabled controls whether HTTP Basic Auth is enabled.
# Also see `searxng_container_label_basicauth_users`.
searxng_basic_auth_enabled: false
searxng_basic_auth_username: ''
searxng_basic_auth_password: ''
# searxng_container_label_basicauth_users is populated at runtime based on
# searxng_basic_auth_username and searxng_basic_auth_password
searxng_container_label_basicauth_users: ''
searxng_basic_auth_apache_container_image: "{{ searxng_basic_auth_apache_container_image_registry_prefix }}httpd:{{ searxng_basic_auth_apache_container_image_tag }}"
searxng_basic_auth_apache_container_image_tag: "2.4.56-alpine3.17"
searxng_basic_auth_apache_container_image_force_pull: "{{ searxng_basic_auth_apache_container_image.endswith(':latest') }}"
searxng_basic_auth_apache_container_image_registry_prefix: docker.io/
searxng_container_http_port: 8080
# Controls whether the searxng container exposes its HTTP port (as
# defined by `searxng_container_http_port`).
#
# Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8731"), or
# empty string to not expose.
searxng_container_http_host_bind_port: ""
# searxng_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
# See `../templates/labels.j2` for details.
#
# To inject your own other container labels, see `searxng_container_labels_additional_labels`.
searxng_container_labels_traefik_enabled: true
searxng_container_labels_traefik_docker_network: "{{ searxng_container_network }}"
searxng_container_labels_traefik_hostname: "{{ searxng_hostname }}"
# The path prefix must either be `/` or not end with a slash (e.g. `/searxng`).
searxng_container_labels_traefik_path_prefix: "{{ searxng_path_prefix }}"
searxng_container_labels_traefik_rule: "Host(`{{ searxng_container_labels_traefik_hostname }}`){% if searxng_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ searxng_container_labels_traefik_path_prefix }}`){% endif %}"
searxng_container_labels_traefik_priority: 0
searxng_container_labels_traefik_entrypoints: web-secure
searxng_container_labels_traefik_tls: "{{ searxng_container_labels_traefik_entrypoints != 'web' }}"
searxng_container_labels_traefik_tls_certResolver: default # noqa var-naming
# Controls which additional headers to attach to all HTTP requests.
# To add your own custom request headers, use `searxng_container_labels_traefik_additional_response_headers_custom`
searxng_container_labels_traefik_additional_request_headers: "{{ searxng_container_labels_traefik_additional_request_headers_auto | combine(searxng_container_labels_traefik_additional_request_headers_custom) }}"
searxng_container_labels_traefik_additional_request_headers_auto: {}
searxng_container_labels_traefik_additional_request_headers_custom: {}
# Controls which additional headers to attach to all HTTP responses.
# To add your own custom response headers, use `searxng_container_labels_traefik_additional_response_headers_custom`
searxng_container_labels_traefik_additional_response_headers: "{{ searxng_container_labels_traefik_additional_response_headers_auto | combine(searxng_container_labels_traefik_additional_response_headers_custom) }}"
searxng_container_labels_traefik_additional_response_headers_auto: |
{{
{}
| combine ({'X-XSS-Protection': searxng_http_header_xss_protection} if searxng_http_header_xss_protection else {})
| combine ({'X-Frame-Options': searxng_http_header_frame_options} if searxng_http_header_frame_options else {})
| combine ({'X-Content-Type-Options': searxng_http_header_content_type_options} if searxng_http_header_content_type_options else {})
| combine ({'Content-Security-Policy': searxng_http_header_content_security_policy} if searxng_http_header_content_security_policy else {})
| combine ({'Permission-Policy': searxng_http_header_content_permission_policy} if searxng_http_header_content_permission_policy else {})
| combine ({'Strict-Transport-Security': searxng_http_header_strict_transport_security} if searxng_http_header_strict_transport_security and searxng_container_labels_traefik_tls else {})
}}
searxng_container_labels_traefik_additional_response_headers_custom: {}
# searxng_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
# See `../templates/labels.j2` for details.
#
# Example:
# searxng_container_labels_additional_labels: |
# my.label=1
# another.label="here"
searxng_container_labels_additional_labels: ''
# Specifies how often the container health-check will run.
#
# For Traefik based setups, it's important that the interval is short,
# because the interval value also specifies the "initial wait time".
# This is a Docker (moby) bug: https://github.com/moby/moby/issues/33410
# Without a successful healthcheck, Traefik will not register the service for reverse-proxying.
# Thus, the health interval determines the initial start-up time -- the smaller, the better.
#
# For non-Traefik setups, we use the default healthcheck interval (60s) to decrease overhead.
searxng_container_health_interval: "{{ '5s' if searxng_container_labels_traefik_enabled else '60s' }}"
searxng_container_hostname: "{{ searxng_hostname }}"
# A list of additional "volumes" to mount in the container.
#
# See the `--mount` documentation for the `docker run` command.
#
# Example:
# searxng_container_additional_volumes:
# - type: bind
# src: /path/on/the/host
# dst: /data
# - type: bind
# src: /another-path/on/the/host
# dst: /read-only
# options: readonly
searxng_container_additional_volumes: []
# A list of extra arguments to pass to the container
searxng_container_extra_arguments: []
# Additional environment variables.
searxng_environment_variables_additional_variables: ''
# Specifies the value of the `X-XSS-Protection` header
# Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.
#
# Learn more about it is here:
# - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
# - https://portswigger.net/web-security/cross-site-scripting/reflected
searxng_http_header_xss_protection: "1; mode=block"
# Specifies the value of the `X-Frame-Options` header which controls whether framing can happen.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
searxng_http_header_frame_options: SAMEORIGIN
# Specifies the value of the `X-Content-Type-Options` header.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
searxng_http_header_content_type_options: nosniff
# Specifies the value of the `Content-Security-Policy` header.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
searxng_http_header_content_security_policy: frame-ancestors 'self'
# Specifies the value of the `Permission-Policy` header.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permission-Policy
searxng_http_header_content_permission_policy: "{{ 'interest-cohort=()' if searxng_floc_optout_enabled else '' }}"
# Specifies the value of the `Strict-Transport-Security` header.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
searxng_http_header_strict_transport_security: "max-age=31536000; includeSubDomains{{ '; preload' if searxng_hsts_preload_enabled else '' }}"
# Controls whether to send a "Permissions-Policy interest-cohort=();" header along with all responses
#
# Learn more about what it is here:
# - https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
# - https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
# - https://amifloced.org/
#
# Of course, a better solution is to just stop using browsers (like Chrome), which participate in such tracking practices.
# See: `searxng_content_permission_policy`
searxng_floc_optout_enabled: true
# Controls if HSTS preloading is enabled
#
# In its strongest and recommended form, the [HSTS policy](https://www.chromium.org/hsts) includes all subdomains, and
# indicates a willingness to be "preloaded" into browsers:
# `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
# For more information visit:
# - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
# - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
# - https://hstspreload.org/#opt-in
# See: `searxng_http_header_strict_transport_security`
searxng_hsts_preload_enabled: false
# List of systemd services that searxng.service depends on
searxng_systemd_required_services_list: "{{ searxng_systemd_required_services_list_default + searxng_systemd_required_services_list_auto + searxng_systemd_required_services_list_custom }}"
searxng_systemd_required_services_list_default: ['docker.service']
searxng_systemd_required_services_list_auto: []
searxng_systemd_required_services_list_custom: []