3
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2026-02-28 09:53:09 +00:00

Rename matrix-appservice-draupnir-for-all _docker_ vars to _container_

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-02-18 06:35:21 +02:00
parent dbc71fccf7
commit 51a357133b
5 changed files with 31 additions and 25 deletions

View File

@@ -22,15 +22,15 @@
- {path: "{{ matrix_appservice_draupnir_for_all_base_path }}", when: true}
- {path: "{{ matrix_appservice_draupnir_for_all_config_path }}", when: true}
- {path: "{{ matrix_appservice_draupnir_for_all_data_path }}", when: true}
- {path: "{{ matrix_appservice_draupnir_for_all_docker_src_files_path }}", when: "{{ matrix_appservice_draupnir_for_all_container_image_self_build }}"}
- {path: "{{ matrix_appservice_draupnir_for_all_container_src_files_path }}", when: "{{ matrix_appservice_draupnir_for_all_container_image_self_build }}"}
when: "item.when | bool"
- name: Ensure Draupnir Docker image is pulled
community.docker.docker_image:
name: "{{ matrix_appservice_draupnir_for_all_docker_image }}"
name: "{{ matrix_appservice_draupnir_for_all_container_image }}"
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
force_source: "{{ matrix_appservice_draupnir_for_all_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_appservice_draupnir_for_all_docker_image_force_pull }}"
force_source: "{{ matrix_appservice_draupnir_for_all_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_appservice_draupnir_for_all_container_image_force_pull }}"
when: "not matrix_appservice_draupnir_for_all_container_image_self_build | bool"
register: matrix_appservice_draupnir_for_all_container_image_pull_result
retries: "{{ devture_playbook_help_container_retries_count }}"
@@ -40,8 +40,8 @@
- name: Ensure Draupnir repository is present on self-build
ansible.builtin.git:
repo: "{{ matrix_appservice_draupnir_for_all_container_image_self_build_repo }}"
dest: "{{ matrix_appservice_draupnir_for_all_docker_src_files_path }}"
version: "{{ matrix_appservice_draupnir_for_all_docker_image.split(':')[1] }}"
dest: "{{ matrix_appservice_draupnir_for_all_container_src_files_path }}"
version: "{{ matrix_appservice_draupnir_for_all_container_image.split(':')[1] }}"
force: "yes"
become: true
become_user: "{{ matrix_user_name }}"
@@ -50,12 +50,12 @@
- name: Ensure Draupnir Docker image is built
community.docker.docker_image:
name: "{{ matrix_appservice_draupnir_for_all_docker_image }}"
name: "{{ matrix_appservice_draupnir_for_all_container_image }}"
source: build
force_source: "{{ matrix_appservice_draupnir_for_all_git_pull_results.changed }}"
build:
dockerfile: Dockerfile
path: "{{ matrix_appservice_draupnir_for_all_docker_src_files_path }}"
path: "{{ matrix_appservice_draupnir_for_all_container_src_files_path }}"
pull: true
when: "matrix_appservice_draupnir_for_all_container_image_self_build | bool"

View File

@@ -7,14 +7,6 @@
---
- name: Fail if required matrix-bot-draupnir variables are undefined
ansible.builtin.fail:
msg: "The `{{ item }}` variable must be defined and have a non-null value."
with_items:
- "matrix_appservice_draupnir_for_all_config_adminRoom"
- "matrix_bot_draupnir_container_network"
when: "lookup('vars', item, default='') == '' or lookup('vars', item, default='') is none"
- name: (Deprecation) Catch and report renamed matrix-appservice-draupnir-for-all settings
ansible.builtin.fail:
msg: >-
@@ -22,6 +14,20 @@
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
with_items:
- {'old': 'matrix_appservice_draupnir_for_all_docker_image_name_prefix', 'new': 'matrix_appservice_draupnir_for_all_docker_image_registry_prefix'}
- {'old': 'matrix_appservice_draupnir_for_all_docker_image_name_prefix', 'new': 'matrix_appservice_draupnir_for_all_container_image_registry_prefix'}
- {'old': 'matrix_appservice_draupnir_for_all_enable_room_state_backing_store', 'new': 'matrix_appservice_draupnir_for_all_config_roomStateBackingStore_enabled'}
- {'old': 'matrix_appservice_draupnir_for_all_master_control_room_alias', 'new': 'matrix_appservice_draupnir_for_all_config_adminRoom'}
- {'old': 'matrix_appservice_draupnir_for_all_docker_image', 'new': 'matrix_appservice_draupnir_for_all_container_image'}
- {'old': 'matrix_appservice_draupnir_for_all_docker_image_force_pull', 'new': 'matrix_appservice_draupnir_for_all_container_image_force_pull'}
- {'old': 'matrix_appservice_draupnir_for_all_docker_image_registry_prefix', 'new': 'matrix_appservice_draupnir_for_all_container_image_registry_prefix'}
- {'old': 'matrix_appservice_draupnir_for_all_docker_image_registry_prefix_upstream', 'new': 'matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream'}
- {'old': 'matrix_appservice_draupnir_for_all_docker_image_registry_prefix_upstream_default', 'new': 'matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream_default'}
- {'old': 'matrix_appservice_draupnir_for_all_docker_src_files_path', 'new': 'matrix_appservice_draupnir_for_all_container_src_files_path'}
- name: Fail if required matrix-bot-draupnir variables are undefined
ansible.builtin.fail:
msg: "The `{{ item }}` variable must be defined and have a non-null value."
with_items:
- "matrix_appservice_draupnir_for_all_config_adminRoom"
- "matrix_bot_draupnir_container_network"
when: "lookup('vars', item, default='') == '' or lookup('vars', item, default='') is none"