create pidfile folder if needed

This commit is contained in:
Massimo Schiavon 2023-08-08 17:49:43 +02:00 committed by GitHub
parent 07b1c514bb
commit 91ec411699
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,6 +53,21 @@
group: "{{ keycloak_service_group }}" group: "{{ keycloak_service_group }}"
mode: 0750 mode: 0750
- name: Check pidfile folder
ansible.builtin.stat:
path: "{{ keycloak_service_pidfile | dirname }}"
register: keycloak_service_pidfile_stat
- name: Create pidfile folder
become: yes
become_user: root
ansible.builtin.file:
dest: "{{ keycloak_service_pidfile | dirname }}"
state: directory
owner: "{{ keycloak_service_user }}"
group: "{{ keycloak_service_group }}"
mode: "0750"
when: not keycloak_service_pidfile_stat.stat.exists
## check remote archive ## check remote archive
- name: Set download archive path - name: Set download archive path
ansible.builtin.set_fact: ansible.builtin.set_fact: