Do not create the avatars directory if it exists.

This commit is contained in:
Andrea Dell'Amico 2022-10-11 10:52:45 +02:00
parent 9da312a3de
commit ab911469e5
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,11 @@
mode: 0750
tags: [ keycloak, keycloak_data_dir ]
- name Check if the avatars directory exists.
stat:
path: '{{ keycloak_external_avatar_dir }}'
register: avatar_dir_creation
- name: Avatar directory
ansible.builtin.file:
dest: '{{ keycloak_external_avatar_dir }}'
@ -50,5 +55,6 @@
owner: '{{ keycloak_user }}'
group: '{{ keycloak_user }}'
mode: 0750
when: avatar_dir_creation.stat.isdir is not defined
tags: keycloak