From a6d51ebe9b10c410b20ed1ce63a8e29481c6e9b1 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 28 Aug 2019 14:00:34 +0300 Subject: [PATCH] Force-pull Slack Docker image if :latest --- roles/matrix-bridge-appservice-slack/defaults/main.yml | 1 + roles/matrix-bridge-appservice-slack/tasks/setup_install.yml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/matrix-bridge-appservice-slack/defaults/main.yml b/roles/matrix-bridge-appservice-slack/defaults/main.yml index f305a732b..58babbc31 100644 --- a/roles/matrix-bridge-appservice-slack/defaults/main.yml +++ b/roles/matrix-bridge-appservice-slack/defaults/main.yml @@ -4,6 +4,7 @@ matrix_appservice_slack_enabled: true matrix_appservice_slack_docker_image: "cadair/matrix-appservice-slack:latest" +matrix_appservice_slack_docker_image_force_pull: "{{ matrix_appservice_slack_docker_image.endswith(':latest') }}" matrix_appservice_slack_base_path: "{{ matrix_base_data_path }}/appservice-slack" matrix_appservice_slack_config_path: "{{ matrix_appservice_slack_base_path }}/config" diff --git a/roles/matrix-bridge-appservice-slack/tasks/setup_install.yml b/roles/matrix-bridge-appservice-slack/tasks/setup_install.yml index dbe20fe85..1e8bc9cdb 100644 --- a/roles/matrix-bridge-appservice-slack/tasks/setup_install.yml +++ b/roles/matrix-bridge-appservice-slack/tasks/setup_install.yml @@ -4,6 +4,8 @@ docker_image: name: "{{ matrix_appservice_slack_docker_image }}" source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" + force_source: "{{ matrix_appservice_slack_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_slack_docker_image_force_pull }}" - name: Ensure AppService Slack paths exist file: @@ -43,4 +45,4 @@ - name: Ensure systemd reloaded after matrix-appservice-slack.service installation service: daemon_reload: yes - when: "matrix_appservice_slack_systemd_service_result.changed" \ No newline at end of file + when: "matrix_appservice_slack_systemd_service_result.changed"