Force-pull Slack Docker image if :latest

This commit is contained in:
Slavi Pantaleev 2019-08-28 14:00:34 +03:00
parent a1b9fbe091
commit a6d51ebe9b
2 changed files with 4 additions and 1 deletions

View file

@ -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"

View file

@ -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"
when: "matrix_appservice_slack_systemd_service_result.changed"