diff --git a/roles/custom/matrix-matrixto/tasks/install.yml b/roles/custom/matrix-matrixto/tasks/install.yml index feae4538e..dfa1cdd4d 100644 --- a/roles/custom/matrix-matrixto/tasks/install.yml +++ b/roles/custom/matrix-matrixto/tasks/install.yml @@ -35,16 +35,12 @@ register: matrix_matrixto_git_pull_results - name: Ensure Matrix.to container image is built - community.docker.docker_image: + community.docker.docker_image_build: name: "{{ matrix_matrixto_container_image_self_build_name }}" - source: build - force_source: "{{ matrix_matrixto_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_matrixto_git_pull_results.changed }}" - build: - dockerfile: Dockerfile - path: "{{ matrix_matrixto_container_image_self_build_src_files_path }}" - pull: true - args: + dockerfile: Dockerfile + path: "{{ matrix_matrixto_container_image_self_build_src_files_path }}" + pull: true + rebuild: "{{ 'always' if matrix_matrixto_git_pull_results.changed | bool else 'never' }}" register: matrix_matrixto_container_image_build_result - name: Ensure Matrix.to container network is created via community.docker.docker_network diff --git a/roles/custom/matrix-matrixto/tasks/validate_config.yml b/roles/custom/matrix-matrixto/tasks/validate_config.yml index f7d807d18..c82e7253c 100644 --- a/roles/custom/matrix-matrixto/tasks/validate_config.yml +++ b/roles/custom/matrix-matrixto/tasks/validate_config.yml @@ -41,3 +41,11 @@ msg: >- matrix_matrixto_container_labels_traefik_path_prefix (`{{ matrix_matrixto_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/matrixto`). when: "matrix_matrixto_container_labels_traefik_path_prefix != '/' and matrix_matrixto_container_labels_traefik_path_prefix[-1] == '/'" + +- name: (Deprecation) Catch and report renamed Matrix.to variables + ansible.builtin.fail: + msg: >- + The variable `{{ item.old }}` is deprecated. Please use `{{ item.new }}` instead. + when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0" + with_items: + - {'old': 'matrix_matrixto_container_image_force_pull', 'new': ' (the new community.docker.docker_image_pull module handles this natively)'}