Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>pull/4945/head
| @@ -2791,7 +2791,7 @@ matrix_bot_matrix_registration_bot_systemd_required_services_list_auto: | | |||||
| matrix_addons_homeserver_systemd_services_list | matrix_addons_homeserver_systemd_services_list | ||||
| }} | }} | ||||
| matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream_default }}" | |||||
| matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream_default }}" | |||||
| matrix_bot_matrix_registration_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}" | matrix_bot_matrix_registration_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}" | ||||
| @@ -14,19 +14,19 @@ | |||||
| matrix_bot_matrix_registration_bot_enabled: true | matrix_bot_matrix_registration_bot_enabled: true | ||||
| matrix_bot_matrix_registration_bot_container_image_self_build: false | 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_repo_version: "{{ 'main' if matrix_bot_matrix_registration_bot_version == 'latest' else ('v' + matrix_bot_matrix_registration_bot_version) }}" | |||||
| matrix_bot_matrix_registration_bot_docker_src_files_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/docker-src" | |||||
| matrix_bot_matrix_registration_bot_container_repo: "https://github.com/moan0s/matrix-registration-bot.git" | |||||
| matrix_bot_matrix_registration_bot_container_repo_version: "{{ 'main' if matrix_bot_matrix_registration_bot_version == 'latest' else ('v' + matrix_bot_matrix_registration_bot_version) }}" | |||||
| matrix_bot_matrix_registration_bot_container_src_files_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/docker-src" | |||||
| # renovate: datasource=docker depName=moanos/matrix-registration-bot | # renovate: datasource=docker depName=moanos/matrix-registration-bot | ||||
| matrix_bot_matrix_registration_bot_version: 1.3.0 | matrix_bot_matrix_registration_bot_version: 1.3.0 | ||||
| matrix_bot_matrix_registration_bot_docker_iteration: 0 | |||||
| matrix_bot_matrix_registration_bot_docker_tag: "{{ matrix_bot_matrix_registration_bot_version }}-{{ matrix_bot_matrix_registration_bot_docker_iteration }}" | |||||
| matrix_bot_matrix_registration_bot_docker_image: "{{ matrix_bot_matrix_registration_bot_docker_image_registry_prefix }}moanos/matrix-registration-bot:{{ matrix_bot_matrix_registration_bot_docker_tag }}" | |||||
| matrix_bot_matrix_registration_bot_docker_image_registry_prefix: "{{ 'localhost/' if matrix_bot_matrix_registration_bot_container_image_self_build else matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream }}" | |||||
| matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream: "{{ matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream_default }}" | |||||
| matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream_default: "docker.io/" | |||||
| matrix_bot_matrix_registration_bot_docker_image_force_pull: "{{ matrix_bot_matrix_registration_bot_docker_image.endswith(':latest') }}" | |||||
| matrix_bot_matrix_registration_bot_container_iteration: 0 | |||||
| matrix_bot_matrix_registration_bot_container_tag: "{{ matrix_bot_matrix_registration_bot_version }}-{{ matrix_bot_matrix_registration_bot_container_iteration }}" | |||||
| matrix_bot_matrix_registration_bot_container_image: "{{ matrix_bot_matrix_registration_bot_container_image_registry_prefix }}moanos/matrix-registration-bot:{{ matrix_bot_matrix_registration_bot_container_tag }}" | |||||
| matrix_bot_matrix_registration_bot_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_matrix_registration_bot_container_image_self_build else matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream }}" | |||||
| matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream: "{{ matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream_default }}" | |||||
| matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream_default: "docker.io/" | |||||
| matrix_bot_matrix_registration_bot_container_image_force_pull: "{{ matrix_bot_matrix_registration_bot_container_image.endswith(':latest') }}" | |||||
| matrix_bot_matrix_registration_bot_base_path: "{{ matrix_base_data_path }}/matrix-registration-bot" | matrix_bot_matrix_registration_bot_base_path: "{{ matrix_base_data_path }}/matrix-registration-bot" | ||||
| matrix_bot_matrix_registration_bot_config_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/config" | matrix_bot_matrix_registration_bot_config_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/config" | ||||
| @@ -18,7 +18,7 @@ | |||||
| with_items: | with_items: | ||||
| - {path: "{{ matrix_bot_matrix_registration_bot_config_path }}", when: true} | - {path: "{{ matrix_bot_matrix_registration_bot_config_path }}", when: true} | ||||
| - {path: "{{ matrix_bot_matrix_registration_bot_data_path }}", when: true} | - {path: "{{ matrix_bot_matrix_registration_bot_data_path }}", when: true} | ||||
| - {path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}", when: "{{ matrix_bot_matrix_registration_bot_container_image_self_build }}"} | |||||
| - {path: "{{ matrix_bot_matrix_registration_bot_container_src_files_path }}", when: "{{ matrix_bot_matrix_registration_bot_container_image_self_build }}"} | |||||
| when: "item.when | bool" | when: "item.when | bool" | ||||
| - name: Ensure matrix-registration-bot configuration file created | - name: Ensure matrix-registration-bot configuration file created | ||||
| @@ -32,10 +32,10 @@ | |||||
| - name: Ensure matrix-registration-bot image is pulled | - name: Ensure matrix-registration-bot image is pulled | ||||
| community.docker.docker_image: | community.docker.docker_image: | ||||
| name: "{{ matrix_bot_matrix_registration_bot_docker_image }}" | |||||
| name: "{{ matrix_bot_matrix_registration_bot_container_image }}" | |||||
| source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" | source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" | ||||
| force_source: "{{ matrix_bot_matrix_registration_bot_docker_image_force_pull 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_bot_matrix_registration_bot_docker_image_force_pull }}" | |||||
| force_source: "{{ matrix_bot_matrix_registration_bot_container_image_force_pull 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_bot_matrix_registration_bot_container_image_force_pull }}" | |||||
| when: "not matrix_bot_matrix_registration_bot_container_image_self_build | bool" | when: "not matrix_bot_matrix_registration_bot_container_image_self_build | bool" | ||||
| register: matrix_bot_matrix_registration_bot_container_image_pull_result | register: matrix_bot_matrix_registration_bot_container_image_pull_result | ||||
| retries: "{{ devture_playbook_help_container_retries_count }}" | retries: "{{ devture_playbook_help_container_retries_count }}" | ||||
| @@ -46,9 +46,9 @@ | |||||
| block: | block: | ||||
| - name: Ensure matrix-registration-bot repository is present on self-build | - name: Ensure matrix-registration-bot repository is present on self-build | ||||
| ansible.builtin.git: | ansible.builtin.git: | ||||
| repo: "{{ matrix_bot_matrix_registration_bot_docker_repo }}" | |||||
| version: "{{ matrix_bot_matrix_registration_bot_docker_repo_version }}" | |||||
| dest: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}" | |||||
| repo: "{{ matrix_bot_matrix_registration_bot_container_repo }}" | |||||
| version: "{{ matrix_bot_matrix_registration_bot_container_repo_version }}" | |||||
| dest: "{{ matrix_bot_matrix_registration_bot_container_src_files_path }}" | |||||
| force: "yes" | force: "yes" | ||||
| become: true | become: true | ||||
| become_user: "{{ matrix_user_name }}" | become_user: "{{ matrix_user_name }}" | ||||
| @@ -56,13 +56,13 @@ | |||||
| - name: Ensure matrix-registration-bot image is built | - name: Ensure matrix-registration-bot image is built | ||||
| community.docker.docker_image: | community.docker.docker_image: | ||||
| name: "{{ matrix_bot_matrix_registration_bot_docker_image }}" | |||||
| name: "{{ matrix_bot_matrix_registration_bot_container_image }}" | |||||
| source: build | source: build | ||||
| force_source: "{{ matrix_bot_matrix_registration_bot_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" | 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_bot_matrix_registration_bot_git_pull_results.changed }}" | force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_matrix_registration_bot_git_pull_results.changed }}" | ||||
| build: | build: | ||||
| dockerfile: Dockerfile | dockerfile: Dockerfile | ||||
| path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}" | |||||
| path: "{{ matrix_bot_matrix_registration_bot_container_src_files_path }}" | |||||
| pull: true | pull: true | ||||
| - name: Ensure matrix-registration-bot container network is created | - name: Ensure matrix-registration-bot container network is created | ||||
| @@ -6,15 +6,6 @@ | |||||
| --- | --- | ||||
| - name: Fail if required settings not defined | |||||
| ansible.builtin.fail: | |||||
| msg: >- | |||||
| You need to define a required configuration setting (`{{ item }}`). | |||||
| when: "lookup('vars', item, default='') == ''" | |||||
| with_items: | |||||
| - "matrix_bot_matrix_registration_bot_bot_password" | |||||
| - "matrix_bot_matrix_registration_bot_api_base_url" | |||||
| - name: (Deprecation) Catch and report renamed settings | - name: (Deprecation) Catch and report renamed settings | ||||
| ansible.builtin.fail: | ansible.builtin.fail: | ||||
| msg: >- | msg: >- | ||||
| @@ -24,3 +15,22 @@ | |||||
| with_items: | with_items: | ||||
| - {'old': 'matrix_bot_matrix_registration_bot_bot_access_token', 'new': '<removed>'} | - {'old': 'matrix_bot_matrix_registration_bot_bot_access_token', 'new': '<removed>'} | ||||
| - {'old': 'matrix_bot_matrix_registration_bot_matrix_homeserver_url', 'new': 'matrix_bot_matrix_registration_bot_api_base_url'} | - {'old': 'matrix_bot_matrix_registration_bot_matrix_homeserver_url', 'new': 'matrix_bot_matrix_registration_bot_api_base_url'} | ||||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_image', 'new': 'matrix_bot_matrix_registration_bot_container_image'} | |||||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_image_force_pull', 'new': 'matrix_bot_matrix_registration_bot_container_image_force_pull'} | |||||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_image_registry_prefix', 'new': 'matrix_bot_matrix_registration_bot_container_image_registry_prefix'} | |||||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream', 'new': 'matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream'} | |||||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream_default'} | |||||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_iteration', 'new': 'matrix_bot_matrix_registration_bot_container_iteration'} | |||||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_repo', 'new': 'matrix_bot_matrix_registration_bot_container_repo'} | |||||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_repo_version', 'new': 'matrix_bot_matrix_registration_bot_container_repo_version'} | |||||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_src_files_path', 'new': 'matrix_bot_matrix_registration_bot_container_src_files_path'} | |||||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_tag', 'new': 'matrix_bot_matrix_registration_bot_container_tag'} | |||||
| - name: Fail if required settings not defined | |||||
| ansible.builtin.fail: | |||||
| msg: >- | |||||
| You need to define a required configuration setting (`{{ item }}`). | |||||
| when: "lookup('vars', item, default='') == ''" | |||||
| with_items: | |||||
| - "matrix_bot_matrix_registration_bot_bot_password" | |||||
| - "matrix_bot_matrix_registration_bot_api_base_url" | |||||
| @@ -27,7 +27,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ | |||||
| --mount type=bind,src={{ matrix_bot_matrix_registration_bot_config_path }},dst=/config,ro \ | --mount type=bind,src={{ matrix_bot_matrix_registration_bot_config_path }},dst=/config,ro \ | ||||
| --mount type=bind,src={{ matrix_bot_matrix_registration_bot_data_path }},dst=/data \ | --mount type=bind,src={{ matrix_bot_matrix_registration_bot_data_path }},dst=/data \ | ||||
| --network={{ matrix_bot_matrix_registration_bot_container_network }} \ | --network={{ matrix_bot_matrix_registration_bot_container_network }} \ | ||||
| {{ matrix_bot_matrix_registration_bot_docker_image }} | |||||
| {{ matrix_bot_matrix_registration_bot_container_image }} | |||||
| {% for network in matrix_bot_matrix_registration_bot_container_additional_networks %} | {% for network in matrix_bot_matrix_registration_bot_container_additional_networks %} | ||||
| ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-bot-matrix-registration-bot | ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-bot-matrix-registration-bot | ||||