diff --git a/roles/custom/matrix-bot-go-neb/defaults/main.yml b/roles/custom/matrix-bot-go-neb/defaults/main.yml index 54d438147..16b8fbc18 100644 --- a/roles/custom/matrix-bot-go-neb/defaults/main.yml +++ b/roles/custom/matrix-bot-go-neb/defaults/main.yml @@ -36,7 +36,6 @@ matrix_bot_go_neb_data_store_path: "{{ matrix_bot_go_neb_data_path }}/store" matrix_bot_go_neb_container_image: "{{ matrix_bot_go_neb_container_image_registry_prefix }}matrixdotorg/go-neb:{{ matrix_bot_go_neb_container_image_tag }}" matrix_bot_go_neb_container_image_tag: "{{ matrix_bot_go_neb_version }}" -matrix_bot_go_neb_container_image_force_pull: "{{ matrix_bot_go_neb_container_image.endswith(':latest') }}" matrix_bot_go_neb_container_image_registry_prefix: "{{ matrix_bot_go_neb_container_image_registry_prefix_upstream }}" matrix_bot_go_neb_container_image_registry_prefix_upstream: "{{ matrix_bot_go_neb_container_image_registry_prefix_upstream_default }}" matrix_bot_go_neb_container_image_registry_prefix_upstream_default: "docker.io/" diff --git a/roles/custom/matrix-bot-go-neb/tasks/install.yml b/roles/custom/matrix-bot-go-neb/tasks/install.yml index 1fd1fb378..a8a74a24a 100644 --- a/roles/custom/matrix-bot-go-neb/tasks/install.yml +++ b/roles/custom/matrix-bot-go-neb/tasks/install.yml @@ -45,11 +45,9 @@ register: matrix_bot_go_neb_support_files_result - name: Ensure go-neb container image is pulled - community.docker.docker_image: + community.docker.docker_image_pull: name: "{{ matrix_bot_go_neb_container_image }}" - source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" - force_source: "{{ matrix_bot_go_neb_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_go_neb_container_image_force_pull }}" + pull: always register: matrix_bot_go_neb_container_image_pull_result retries: "{{ devture_playbook_help_container_retries_count }}" delay: "{{ devture_playbook_help_container_retries_delay }}" diff --git a/roles/custom/matrix-bot-go-neb/tasks/validate_config.yml b/roles/custom/matrix-bot-go-neb/tasks/validate_config.yml index ead635626..a9151044f 100644 --- a/roles/custom/matrix-bot-go-neb/tasks/validate_config.yml +++ b/roles/custom/matrix-bot-go-neb/tasks/validate_config.yml @@ -16,3 +16,11 @@ msg: >- You need at least 1 service in the matrix_bot_go_neb_services block. when: matrix_bot_go_neb_services is not defined or matrix_bot_go_neb_services[0] is not defined + +- name: (Deprecation) Catch and report renamed matrix-bot-go-neb 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_bot_go_neb_container_image_force_pull', 'new': ' (the new community.docker.docker_image_pull module handles this natively)'}