check stat.exists before stat.isdir
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2653|7|2646|4|:-1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/409//ansiblelint">Evolix » ansible-roles » unstable #409</a>
gitea/ansible-roles/pipeline/head This commit looks good

This commit is contained in:
William Hirigoyen 2023-11-29 10:13:27 +01:00
parent 83e61b25a5
commit 1a74bef0bc
3 changed files with 3 additions and 2 deletions

View file

@ -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: added check that nexctcloud uid is over 3000
* webapps/nextcloud: fix misplaced gid attribute * webapps/nextcloud: fix misplaced gid attribute
* webapps/nextcloud: fix missing gid * webapps/nextcloud: fix missing gid
* check stat.exists before stat.isdir
### Removed ### Removed

View file

@ -119,4 +119,4 @@
cmd: "{{ docker_tls_path }}/shellpki.sh init" cmd: "{{ docker_tls_path }}/shellpki.sh init"
when: when:
- docker_tls_enabled | bool - docker_tls_enabled | bool
- not tls_certs_stat.stat.isdir - not (tls_certs_stat.stat. and tls_certs_stat.stat.isdir)

View file

@ -31,7 +31,7 @@
repository_path: "/usr/share/scripts" repository_path: "/usr/share/scripts"
gitignore_items: [] gitignore_items: []
when: when:
- _usr_share_scripts.stat.isdir - _usr_share_scripts.stat.exists and _usr_share_scripts.stat.isdir
- ansible_distribution_major_version is version('10', '>=') - ansible_distribution_major_version is version('10', '>=')
tags: tags:
- etc-git - etc-git