From 1a74bef0bcaa0a040ae539b647f610cfdab409dd Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Wed, 29 Nov 2023 10:13:27 +0100 Subject: [PATCH] check stat.exists before stat.isdir --- CHANGELOG.md | 1 + docker-host/tasks/main.yml | 2 +- etc-git/tasks/repositories.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1726b6c8..fb6418cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * webapps/nextcloud: added check that nexctcloud uid is over 3000 * webapps/nextcloud: fix misplaced gid attribute * webapps/nextcloud: fix missing gid +* check stat.exists before stat.isdir ### Removed diff --git a/docker-host/tasks/main.yml b/docker-host/tasks/main.yml index 556570f5..036c12ce 100644 --- a/docker-host/tasks/main.yml +++ b/docker-host/tasks/main.yml @@ -119,4 +119,4 @@ cmd: "{{ docker_tls_path }}/shellpki.sh init" when: - docker_tls_enabled | bool - - not tls_certs_stat.stat.isdir + - not (tls_certs_stat.stat. and tls_certs_stat.stat.isdir) diff --git a/etc-git/tasks/repositories.yml b/etc-git/tasks/repositories.yml index dd8031ae..aab2295e 100644 --- a/etc-git/tasks/repositories.yml +++ b/etc-git/tasks/repositories.yml @@ -31,7 +31,7 @@ repository_path: "/usr/share/scripts" gitignore_items: [] when: - - _usr_share_scripts.stat.isdir + - _usr_share_scripts.stat.exists and _usr_share_scripts.stat.isdir - ansible_distribution_major_version is version('10', '>=') tags: - etc-git