I’ve got a playbook that needs to set some SELinux labels etc. And I’ve come up with two questions:
So far I’ve used direct invocation of "semanage fcontext -a -t logwatch_cache_t “/var/lib/logwatch(/.*)?”. I have noticed that “file” module exposes some of the selinux labeling elements, however I’m having a rough time imagining how would I implement above invocation using file module…
when using “file: … setype” - it seems nothing is stored in /etc/selinux/targeted/contexts/files/file_contexts.local afterwards. Thus shall I assume it’s more of a “chcon” front then “semanage fcontext” ?