This role lets you set the SELinux fcontext for the given pattern and apply it to the given path.
Name | Required | Example | Description |
---|---|---|---|
path |
yes | /var/www/db |
Path to run restorecon on after setting up the fcontext. |
type |
yes | httpd_sys_rw_content_t |
fcontext type to set for the given pattern. |
pattern |
yes | /var/www/db(/.*)? |
Pattern that corresponds to the given type. |
- include_role:
name: noobient.setfcontext
vars:
path: '/var/www/db'
type: 'httpd_sys_rw_content_t'
pattern: "/var/www/db(/.*)?"
N/A
Platform | Support | Status |
---|---|---|
Linter | ✅ | |
AlmaLinux 8 | ✅ | |
AlmaLinux 9 | ✅ | |
Fedora 40 | ✅ | |
Fedora 41 | ✅ | |
Ubuntu 20.04 | ❌ | N/A |
Ubuntu 22.04 | ❌ | N/A |
Ubuntu 24.04 | ❌ | N/A |