From 3a3708e9a6d4a46790b338dcd7d723a03fc463fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Tue, 5 Dec 2017 23:44:59 +0100 Subject: [PATCH] Nginx: really fix munin-cgi log files permission with_fileglob is executed locally, not remotely. It is useless here. Instead, let's explicitely chown all files with a shell command. --- nginx/tasks/munin_vhost.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/nginx/tasks/munin_vhost.yml b/nginx/tasks/munin_vhost.yml index b4145724..bd6c5ee6 100644 --- a/nginx/tasks/munin_vhost.yml +++ b/nginx/tasks/munin_vhost.yml @@ -16,13 +16,11 @@ - spawn-fcgi - name: Adjust rights for munin-cgi - file: - path: '{{ item }}' - owner: www-data - group: munin - mode: "0660" - with_fileglob: - - /var/log/munin/munin-cgi-* + shell: "chown --verbose www-data:munin /var/log/munin/munin-cgi-*" + register: command_result + changed_when: "'changed' in command_result.stdout" + args: + warn: no - name: Install Init script for Munin-fcgi copy: