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

Address smaller remarks, fix local docker build

pull/1771/head
Julian-Samuel Gebühr 3 лет назад
Родитель
Сommit
f0cf1daed9
3 измененных файлов: 12 добавлений и 34 удалений
  1. +10
    -0
      group_vars/matrix_servers
  2. +1
    -28
      roles/matrix-bot-matrix-registration-bot/defaults/main.yml
  3. +1
    -6
      roles/matrix-bot-matrix-registration-bot/tasks/setup_install.yml

+ 10
- 0
group_vars/matrix_servers Просмотреть файл

@@ -995,6 +995,16 @@ matrix_bot_matrix_reminder_bot_container_image_self_build: "{{ matrix_architectu
######################################################################
# We don't enable bots by default.
matrix_bot_matrix_registration_bot_enabled: false
matrix_bot_matrix_registration_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"

matrix_bot_matrix_registration_bot_systemd_required_services_list: |
{{
['docker.service']
+
['matrix-' + matrix_homeserver_implementation + '.service']
+
(['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
}}

######################################################################
#


+ 1
- 28
roles/matrix-bot-matrix-registration-bot/defaults/main.yml Просмотреть файл

@@ -5,7 +5,7 @@
matrix_bot_matrix_registration_bot_enabled: true
matrix_bot_matrix_registration_bot_container_image_self_build: false
matrix_bot_matrix_registration_bot_docker_repo: "https://github.com/moan0s/matrix-registration-bot.git"
matrix_bot_matrix_registration_bot_docker_src_files_path: "{{ matrix_base_data_path }}/matrix-registration-bot/"
matrix_bot_matrix_registration_bot_docker_src_files_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/docker-src"

matrix_bot_matrix_registration_bot_version: latest
matrix_bot_matrix_registration_bot_docker_image: "{{ matrix_container_global_registry_prefix }}moanos/matrix-registration-bot:{{ matrix_bot_matrix_registration_bot_version }}"
@@ -33,30 +33,3 @@ matrix_bot_matrix_registration_bot_matrix_user_id: '@{{ matrix_bot_matrix_regist
matrix_bot_matrix_registration_bot_matrix_user_password: ''

matrix_bot_matrix_registration_bot_matrix_homeserver_url: "{{ matrix_homeserver_container_url }}"

# Default configuration template which covers the generic use case.
# You can customize it by controlling the various variables inside it.
#
# For a more advanced customization, you can extend the default (see `matrix_bot_matrix_registration_bot_configuration_extension_yaml`)
# or completely replace this variable with your own template.
matrix_bot_matrix_registration_bot_configuration_yaml: "{{ lookup('template', 'templates/config.yml.j2') }}"

matrix_bot_matrix_registration_bot_configuration_extension_yaml: |
# Your custom YAML configuration goes here.
# This configuration extends the default starting configuration (`matrix_bot_matrix_registration_bot_configuration_yaml`).
#
# You can override individual variables from the default configuration, or introduce new ones.
#
# If you need something more special, you can take full control by
# completely redefining `matrix_bot_matrix_registration_bot_configuration_yaml`.
#
# Example configuration extension follows:
#
# matrix:
# device_name: My-Registration-Bot

matrix_bot_matrix_registration_bot_configuration_extension: "{{ matrix_bot_matrix_registration_bot_configuration_extension_yaml|from_yaml if matrix_bot_matrix_registration_bot_configuration_extension_yaml|from_yaml is mapping else {} }}"

# Holds the final configuration (a combination of the default and its extension).
# You most likely don't need to touch this variable. Instead, see `matrix_bot_matrix_registration_bot_configuration_yaml`.
matrix_bot_matrix_registration_bot_configuration: "{{ matrix_bot_matrix_registration_bot_configuration_yaml|from_yaml|combine(matrix_bot_matrix_registration_bot_configuration_extension, recursive=True) }}"

+ 1
- 6
roles/matrix-bot-matrix-registration-bot/tasks/setup_install.yml Просмотреть файл

@@ -1,9 +1,5 @@
---

- set_fact:
matrix_bot_matrix_registration_bot_requires_restart: false


- name: Ensure matrix-registration-bot paths exist
file:
path: "{{ item.path }}"
@@ -45,7 +41,7 @@
force_source: "{{ matrix_bot_matrix_registration_bot_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mailer_git_pull_results.changed }}"
build:
dockerfile: docker/Dockerfile
dockerfile: Dockerfile
path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}"
pull: true
when: "matrix_bot_matrix_registration_bot_container_image_self_build|bool"
@@ -66,4 +62,3 @@
service:
name: "matrix-bot-matrix-registration-bot.service"
state: restarted
when: "matrix_bot_matrix_registration_bot_requires_restart|bool"

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