From c8030de88bb627cb66ad1872f56de7f1f5e51ebb Mon Sep 17 00:00:00 2001 From: saibotk Date: Sat, 26 Sep 2020 21:39:38 +0200 Subject: [PATCH] telegraf: 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/telegraf/tasks/main.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/roles/telegraf/tasks/main.yml b/roles/telegraf/tasks/main.yml index 1e8566f..d6eca92 100644 --- a/roles/telegraf/tasks/main.yml +++ b/roles/telegraf/tasks/main.yml @@ -30,14 +30,19 @@ file: path: "{{ item }}" state: directory + mode: '0700' + owner: 'root' + group: 'root' with_items: - "{{ telegraf_install_location }}" become: true -- name: Create data directory +- name: Create config directory file: path: "{{ item }}" - mode: "0700" + mode: '0700' + owner: 'root' + group: 'root' state: directory setype: "container_file_t" with_items: