From daeec7e455ff75c6be9ce236c628b4b8f76f516a Mon Sep 17 00:00:00 2001 From: binary Date: Wed, 20 Jan 2021 00:14:14 +0100 Subject: Ignore errors when no directory is mounted --- roles/cgit/tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'roles/cgit') diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml index 424a07e..28abc9c 100644 --- a/roles/cgit/tasks/main.yml +++ b/roles/cgit/tasks/main.yml @@ -44,6 +44,8 @@ - name: unmount potential existing filesystem in target directory shell: "umount /var/www/{{ cgit_git_dir_chroot }}" + register: result + failed_when: result.rc != 0 and "not currently mounted" not in result.stderr - name: ensure cgit web directory exists file: -- cgit v1.2.3