blackstar257.selinux
Ansible 角色: Selinux
配置 SELinux。
需求
此角色需要 Ansible 1.4 或更高版本。
角色变量
| 名称 | 默认值 | 描述 |
|---|---|---|
| selinux_policy | targeted | SELinux 策略类型(targeted 或 mls) |
| selinux_state | permissive | SELinux 状态(permissive, enforcing 或 disabled) |
| selinux_relabel | true | 启用后开机自动重新标记文件 |
依赖
无
示例剧本
在宽容模式下配置 SELinux。
- hosts: all
roles:
- blackstar257.selinux
禁用 SELinux
- hosts: all
roles:
- { role: blackstar257.selinux, selinux_state: disabled }
配置 SELinux 使用 mls 策略并设置为强制模式
- hosts: all
vars:
selinux_policy: mls
selinux_state: enforcing
roles:
- blackstar257.selinux
许可证
BSD
作者信息
原作者: Kevin Brebanov
由 blackstar257 进行分支
