Просмотр исходного кода

Add rust logging variable

pull/5289/head
jasonlaguidice 1 неделю назад
Родитель
Сommit
3a70e8c602
3 измененных файлов: 17 добавлений и 0 удалений
  1. +13
    -0
      roles/custom/matrix-bridge-rustpush/defaults/main.yml
  2. +3
    -0
      roles/custom/matrix-bridge-rustpush/tasks/setup_install.yml
  3. +1
    -0
      roles/custom/matrix-bridge-rustpush/templates/systemd/matrix-rustpush-bridge.service.j2

+ 13
- 0
roles/custom/matrix-bridge-rustpush/defaults/main.yml Просмотреть файл

@@ -93,6 +93,19 @@ matrix_rustpush_bridge_container_labels_additional_labels: ''
# A list of extra arguments to pass to the container # A list of extra arguments to pass to the container
matrix_rustpush_bridge_container_extra_arguments: [] matrix_rustpush_bridge_container_extra_arguments: []


# Override the Rust log filter passed to the bridge container via RUST_LOG.
# Leave empty to use the bridge's built-in default
# ("warn,rustpush=warn,rustpushgo=info,open_absinthe=info").
#
# Useful values:
# "warn,rustpushgo=info,open_absinthe=debug" # NAC emulator diagnostics (_enc field sizes, etc.)
# "warn,rustpushgo=info,open_absinthe=debug,rustpush=info" # + upstream rustpush internals
# "debug" # everything (very chatty)
#
# The open_absinthe crate logs NAC hardware-key diagnostics at INFO and emulator
# state at DEBUG. These are suppressed by default to reduce log noise.
matrix_rustpush_bridge_rust_log: ""

# List of systemd services that matrix-rustpush-bridge.service depends on. # List of systemd services that matrix-rustpush-bridge.service depends on.
matrix_rustpush_bridge_systemd_required_services_list: "{{ matrix_rustpush_bridge_systemd_required_services_list_default + matrix_rustpush_bridge_systemd_required_services_list_auto + matrix_rustpush_bridge_systemd_required_services_list_custom }}" matrix_rustpush_bridge_systemd_required_services_list: "{{ matrix_rustpush_bridge_systemd_required_services_list_default + matrix_rustpush_bridge_systemd_required_services_list_auto + matrix_rustpush_bridge_systemd_required_services_list_custom }}"
matrix_rustpush_bridge_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" matrix_rustpush_bridge_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"


+ 3
- 0
roles/custom/matrix-bridge-rustpush/tasks/setup_install.yml Просмотреть файл

@@ -47,6 +47,9 @@
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_rustpush_bridge_docker_src_files_path }}" path: "{{ matrix_rustpush_bridge_docker_src_files_path }}"
pull: true pull: true
args:
BUILD_VERSION: "{{ matrix_rustpush_bridge_container_image_self_build_repo_version }}"
BUILD_COMMIT: "{{ matrix_rustpush_bridge_git_pull_results.after[:8] if matrix_rustpush_bridge_git_pull_results is defined and matrix_rustpush_bridge_git_pull_results.after is defined else 'unknown' }}"
register: matrix_rustpush_bridge_container_image_build_result register: matrix_rustpush_bridge_container_image_build_result
when: "matrix_rustpush_bridge_enabled | bool and matrix_rustpush_bridge_container_image_self_build | bool" when: "matrix_rustpush_bridge_enabled | bool and matrix_rustpush_bridge_container_image_self_build | bool"




+ 1
- 0
roles/custom/matrix-bridge-rustpush/templates/systemd/matrix-rustpush-bridge.service.j2 Просмотреть файл

@@ -24,6 +24,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
--cap-drop=ALL \ --cap-drop=ALL \
--network={{ matrix_rustpush_bridge_container_network }} \ --network={{ matrix_rustpush_bridge_container_network }} \
--env HOME=/data \ --env HOME=/data \
{% if matrix_rustpush_bridge_rust_log %}--env RUST_LOG={{ matrix_rustpush_bridge_rust_log }} \{% endif %}
--mount type=bind,src={{ matrix_rustpush_bridge_config_path }},dst=/config \ --mount type=bind,src={{ matrix_rustpush_bridge_config_path }},dst=/config \
--mount type=bind,src={{ matrix_rustpush_bridge_data_path }},dst=/data \ --mount type=bind,src={{ matrix_rustpush_bridge_data_path }},dst=/data \
--label-file={{ matrix_rustpush_bridge_base_path }}/labels \ --label-file={{ matrix_rustpush_bridge_base_path }}/labels \


Загрузка…
Отмена
Сохранить