Is there an Ansible module that allows an SELinux context equivalence to be added? The command is:
semanage fcontext -a -e /home/xxx /srv/xxx
This makes SELinux treat /srv/xxx
as equivalent to /home/xxx
.
While I could use the command
module, it only works once; after that it always fails with:
ValueError: Equivalence class for /srv/xxx already exists
I could use the shell
module and run a command like:
semanage fcontext -a -e /home/xxx /srv/xxx || true
but since the command runs every time, Ansible always reports something has changed (even if the context equivalence already existed).