Skip to content

selinux_fcontext

A local SELinux file context rule. Conn3x relabels the files it covers after every change.

step "example" {
selinux_fcontext {
setype = "..."
target = "..."
}
}
Name Type Required Description
on_remove string No “forget” (default) keeps the rule, “delete” removes it and relabels.
setype string Yes SELinux type, such as httpd_sys_content_t.
target string Yes Path expression, such as /srv/www(/.*)?.

Conn3x sets these; reference them as conn3x_selinux_fcontext.<circuit>__<step>["<host>"].<name>.

Name Type Description
in_sync bool Whether the host has the rule.

A step lowers to the conn3x_selinux_fcontext resource, one instance per host, and connects with its circuit’s ssh block.