From d00a98c39f78a550f491b1994785c39e8f897b77 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 2 Dec 2020 12:00:05 +0100 Subject: [PATCH] Update to 2020-12-02 12:00 --- roles/nginx/tasks/selinux.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/roles/nginx/tasks/selinux.yml b/roles/nginx/tasks/selinux.yml index 54e69f5..c2f5bd2 100644 --- a/roles/nginx/tasks/selinux.yml +++ b/roles/nginx/tasks/selinux.yml @@ -11,3 +11,14 @@ when: ansible_selinux.status == 'enabled' tags: web +- name: Ensure correct context on cache + sefcontext: + target: '/var/cache/nginx(/.*)?' + setype: httpd_cache_t + register: nginx_cache_context + tags: web + +- name: Restore context of cache files + command: restorecon -R /var/cache/nginx + changed_when: nginx_cache_context.changed + tags: web