r/squid: Fix SELinux AVC denial after cache init

Running `squid -z` as *root* leaves behind temporary files in
`/dev/shm`.  When *squid.service* starts squid, in the proper SELinux
domain, it is unable to access these files and crashes.  To avoid this,
we mount a private *tmpfs* so no existing files are accessible in the
service's namespace.
This commit is contained in:
2024-01-27 20:28:06 -06:00
parent be63424fd8
commit 7569c9da0d
2 changed files with 25 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
- name: reload systemd
systemd:
daemon_reload: true
- name: initialize squid cache directories
command:
/usr/sbin/squid -N -z -F -f /etc/squid/squid.conf