From 4f476e16add8c886afb884983f4c301382a6cfa1 Mon Sep 17 00:00:00 2001 From: Nedim Hadzimahmutovic Date: Mon, 17 Apr 2023 22:04:33 +0700 Subject: [PATCH] Check if roundcube directory exists --- tasks/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index c9cc46d..aec11a6 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -48,6 +48,11 @@ import_tasks: mcrypt.yml when: ansible_distribution_major_version|int > 9 +- name: Check if roundcube directory exists + stat: + path: "{{ roundcube_user_home }}/roundcubemail-{{ roundcube_version }}" + register: "roundcube_directory" + - name: Get roundcube release get_url: url: "https://github.com/roundcube/roundcubemail/releases/download/{{ roundcube_version }}/roundcubemail-{{ roundcube_version }}-complete.tar.gz" @@ -66,7 +71,7 @@ group: "{{ roundcube_group }}" mode: 0750 copy: no - when: download.changed + when: (download.changed) or (not roundcube_directory.stat.exists) - name: Link to current release file: