From d6ab9643cc47c731fa9af2fa647537f6684153c8 Mon Sep 17 00:00:00 2001 From: saibotk Date: Sat, 26 Sep 2020 21:30:10 +0200 Subject: [PATCH] codimd: 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 codimd takes care of the permissions etc. --- roles/codimd/tasks/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/codimd/tasks/main.yml b/roles/codimd/tasks/main.yml index 391e143..3049f46 100644 --- a/roles/codimd/tasks/main.yml +++ b/roles/codimd/tasks/main.yml @@ -40,6 +40,9 @@ file: path: "{{ item }}" state: directory + mode: '0700' + owner: 'root' + group: 'root' with_items: - "{{ codimd_install_location }}" tags: @@ -47,7 +50,7 @@ become: true - name: Create data directory - file: + file: # noqa 208 # Container adjusts permissions on its own path: "{{ item.location }}" state: directory setype: "container_file_t"