From 228dc7516e8fbe65b53ddc469dbb35d6183a8075 Mon Sep 17 00:00:00 2001 From: saibotk Date: Sat, 26 Sep 2020 21:34:24 +0200 Subject: [PATCH] gitlab_runner: 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/gitlab_runner/tasks/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/gitlab_runner/tasks/main.yml b/roles/gitlab_runner/tasks/main.yml index f0e56e8..a468ebf 100644 --- a/roles/gitlab_runner/tasks/main.yml +++ b/roles/gitlab_runner/tasks/main.yml @@ -31,14 +31,20 @@ file: path: "{{ item }}" state: directory + mode: '0700' + owner: 'root' + group: 'root' with_items: - "{{ gitlabrunner_install_location }}" become: true -- name: Create data directory +- name: Create config directory file: path: "{{ item }}" state: directory + mode: '0700' + owner: 'root' + group: 'root' setype: "container_file_t" with_items: - "{{ gitlabrunner_config_location }}"