From 69d1b5f8f70f812c52f7cc487aef064086d60326 Mon Sep 17 00:00:00 2001 From: saibotk Date: Sat, 26 Sep 2020 21:33:31 +0200 Subject: [PATCH] keycloak: Adjust directory permissions This patch reduces the permissions on the install directory to just the root user and also fixes the ansible-lint issue for specifying the `mode`. For all container mounted volumes, the ansible-lint rule is disabled, as the container takes care of the permissions etc. --- roles/keycloak/tasks/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/keycloak/tasks/main.yml b/roles/keycloak/tasks/main.yml index b5cbef7..1da7305 100644 --- a/roles/keycloak/tasks/main.yml +++ b/roles/keycloak/tasks/main.yml @@ -33,6 +33,9 @@ file: path: "{{ item }}" state: directory + mode: '0700' + owner: 'root' + group: 'root' with_items: - "{{ keycloak_install_location }}" tags: @@ -40,7 +43,7 @@ become: true - name: Create data directory - file: + file: # noqa 208 # Container manages permissions on its own path: "{{ item }}" state: directory setype: "container_file_t"