From 0f83d6503ba0737d9ca6b85e6760726db5801871 Mon Sep 17 00:00:00 2001 From: saibotk Date: Sat, 26 Sep 2020 21:37:15 +0200 Subject: [PATCH] minecraft_blockmap: Adjust directory permissions This patch reduces the permissions on the install directory to just the root user and also fixes the ansible-lint issue by specifying the `mode`. --- roles/minecraft_blockmap/tasks/main.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/roles/minecraft_blockmap/tasks/main.yml b/roles/minecraft_blockmap/tasks/main.yml index 09c6aab..bc607e2 100644 --- a/roles/minecraft_blockmap/tasks/main.yml +++ b/roles/minecraft_blockmap/tasks/main.yml @@ -31,7 +31,9 @@ file: path: "{{ item }}" state: directory - mode: '0600' + mode: '0700' + owner: 'root' + group: 'root' with_items: - "{{ minecraft_blockmap_install_location }}" become: true @@ -42,6 +44,9 @@ file: path: "{{ item }}" state: directory + mode: '0750' + owner: 'root' + group: 'root' setype: "container_file_t" with_items: - "{{ minecraft_blockmap_output_location }}" @@ -54,6 +59,9 @@ file: path: "{{ item }}" state: directory + mode: '0755' + owner: 'root' + group: 'root' with_items: - "{{ minecraft_blockmap_archive_location }}" become: true @@ -96,6 +104,9 @@ file: path: "/blockmap_snapshot" state: directory + mode: '0700' + owner: 'root' + group: 'root' recurse: true become: true @@ -103,7 +114,7 @@ template: src: "{{ item.src }}" dest: "{{ item.dest }}" - mode: '1700' + mode: '0700' owner: root group: root with_items: