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

Rename matrix-bot-honoroit _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:58:03 +02:00
parent 893e90a65f
commit 528a32f6c1
5 changed files with 36 additions and 28 deletions

View File

@@ -47,7 +47,7 @@
- {path: "{{ matrix_bot_honoroit_config_path }}", when: true}
- {path: "{{ matrix_bot_honoroit_data_path }}", when: true}
- {path: "{{ matrix_bot_honoroit_data_store_path }}", when: true}
- {path: "{{ matrix_bot_honoroit_docker_src_files_path }}", when: true}
- {path: "{{ matrix_bot_honoroit_container_src_files_path }}", when: true}
when: "item.when | bool"
- name: Ensure Honoroit support files installed
@@ -64,10 +64,10 @@
- name: Ensure Honoroit image is pulled
community.docker.docker_image:
name: "{{ matrix_bot_honoroit_docker_image }}"
name: "{{ matrix_bot_honoroit_container_image }}"
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
force_source: "{{ matrix_bot_honoroit_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_honoroit_docker_image_force_pull }}"
force_source: "{{ matrix_bot_honoroit_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_honoroit_container_image_force_pull }}"
when: "not matrix_bot_honoroit_container_image_self_build | bool"
register: matrix_bot_honoroit_container_image_pull_result
retries: "{{ devture_playbook_help_container_retries_count }}"
@@ -76,9 +76,9 @@
- name: Ensure Honoroit repository is present on self-build
ansible.builtin.git:
repo: "{{ matrix_bot_honoroit_docker_repo }}"
version: "{{ matrix_bot_honoroit_docker_repo_version }}"
dest: "{{ matrix_bot_honoroit_docker_src_files_path }}"
repo: "{{ matrix_bot_honoroit_container_repo }}"
version: "{{ matrix_bot_honoroit_container_repo_version }}"
dest: "{{ matrix_bot_honoroit_container_src_files_path }}"
force: "yes"
become: true
become_user: "{{ matrix_user_name }}"
@@ -87,13 +87,13 @@
- name: Ensure Honoroit image is built
community.docker.docker_image:
name: "{{ matrix_bot_honoroit_docker_image }}"
name: "{{ matrix_bot_honoroit_container_image }}"
source: build
force_source: "{{ matrix_bot_honoroit_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_honoroit_container_image_self_build.changed }}"
build:
dockerfile: Dockerfile
path: "{{ matrix_bot_honoroit_docker_src_files_path }}"
path: "{{ matrix_bot_honoroit_container_src_files_path }}"
pull: true
when: "matrix_bot_honoroit_container_image_self_build | bool"

View File

@@ -6,6 +6,23 @@
---
- name: (Deprecation) Catch and report renamed Honoroit settings
ansible.builtin.fail:
msg: >-
Your configuration contains a variable, which now has a different name.
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_bot_honoroit_container_image_name_prefix', 'new': 'matrix_bot_honoroit_container_image_registry_prefix'}
- {'old': 'matrix_bot_honoroit_docker_image', 'new': 'matrix_bot_honoroit_container_image'}
- {'old': 'matrix_bot_honoroit_docker_image_force_pull', 'new': 'matrix_bot_honoroit_container_image_force_pull'}
- {'old': 'matrix_bot_honoroit_docker_image_registry_prefix', 'new': 'matrix_bot_honoroit_container_image_registry_prefix'}
- {'old': 'matrix_bot_honoroit_docker_image_registry_prefix_upstream', 'new': 'matrix_bot_honoroit_container_image_registry_prefix_upstream'}
- {'old': 'matrix_bot_honoroit_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bot_honoroit_container_image_registry_prefix_upstream_default'}
- {'old': 'matrix_bot_honoroit_docker_repo', 'new': 'matrix_bot_honoroit_container_repo'}
- {'old': 'matrix_bot_honoroit_docker_repo_version', 'new': 'matrix_bot_honoroit_container_repo_version'}
- {'old': 'matrix_bot_honoroit_docker_src_files_path', 'new': 'matrix_bot_honoroit_container_src_files_path'}
- name: Fail if required Honoroit settings not defined
ansible.builtin.fail:
msg: >-
@@ -16,12 +33,3 @@
- {'name': 'matrix_bot_honoroit_password', when: true}
- {'name': 'matrix_bot_honoroit_roomid', when: true}
- {'name': 'matrix_bot_honoroit_database_hostname', when: "{{ matrix_bot_honoroit_database_engine == 'postgres' }}"}
- name: (Deprecation) Catch and report renamed Honoroit settings
ansible.builtin.fail:
msg: >-
Your configuration contains a variable, which now has a different name.
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_bot_honoroit_container_image_name_prefix', 'new': 'matrix_bot_honoroit_container_image_registry_prefix'}