8000 Sane Selinux defaults by eb4x · Pull Request #1537 · ansible-collections/community.zabbix · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Sane Selinux defaults #1537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/1537_selinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- roles - sane selinux defaults
2 changes: 2 additions & 0 deletions docs/ZABBIX_PROXY_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ The following is an overview of all available configuration default for this rol

Selinux changes will be installed based on the status of selinux running on the target system.

* `selinux_allow_zabbix_can_network`: Default: `True`.

## Proxy

When the target host does not have access to the internet, but you do have a proxy available then the following properties needs to be set to download the packages via the proxy:
Expand Down
2 changes: 1 addition & 1 deletion docs/ZABBIX_SERVER_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The following is an overview of all available configuration default for this rol

Selinux changes will be installed based on the status of selinux running on the target system.

* `selinux_allow_zabbix_can_network`: Default: `False`.
* `selinux_allow_zabbix_can_network`: Default: `True`.

### Zabbix Server

Expand Down
6 changes: 3 additions & 3 deletions docs/ZABBIX_WEB_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ The following properties are specific to Zabbix 5.0 and for the PHP(-FPM) config

Selinux changes will be installed based on the status of selinux running on the target system.

* `selinux_allow_httpd_can_connect_zabbix`: Default: `false`. Set SELinux boolean to allow httpd to connect to zabbix.
* `selinux_allow_httpd_can_connect_ldap`: Default: `false`. Set SELinux boolean to allow httpd to connect to LDAP.
* `selinux_allow_httpd_can_network_connect_db`: Default: `false` Set SELinux boolean to allow httpd to connect databases over the network.
* `selinux_allow_httpd_can_connect_ldap`: Default: `False`. Set SELinux boolean to allow httpd to connect to LDAP.
* `selinux_allow_httpd_can_connect_zabbix`: Default: `True`. Set SELinux boolean to allow httpd to connect to zabbix.
* `selinux_allow_httpd_can_network_connect_db`: Default: `True` Set SELinux boolean to allow httpd to connect databases over the network.

### Zabbix Server

Expand Down
3 changes: 1 addition & 2 deletions roles/zabbix_proxy/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ zabbix_proxy_install_database_client: true
zabbix_proxy_database_file_dir: "{{ zabbix_proxy_version is version('7.0', '>') | ternary(_zabbix_proxy_database_file_dir_post72, _zabbix_proxy_database_file_dir_pre72 ) }}"

# SELinux specific
selinux_allow_zabbix_can_network: false
selinux_allow_daemons_enable_cluster_mode: false
selinux_allow_zabbix_can_network: true

# Misc.
zabbix_proxy_cat_cmd: cat
Expand Down
2 changes: 0 additions & 2 deletions roles/zabbix_proxy/tasks/selinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
loop:
- name: zabbix_can_network
state: "{{ selinux_allow_zabbix_can_network }}"
- name: daemons_enable_cluster_mode
state: "{{ selinux_allow_daemons_enable_cluster_mode }}"
2 changes: 1 addition & 1 deletion roles/zabbix_server/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ zabbix_server_install_database_client: true
zabbix_server_database_schemas: "{{ _zabbix_server_database_schemas[zabbix_server_database] }}"

# SELinux specific
selinux_allow_zabbix_can_network: false
selinux_allow_zabbix_can_network: true

#Misc.
zabbix_server_include_mode: "0755"
Expand Down
4 changes: 2 additions & 2 deletions roles/zabbix_web/defaults/main.yml
4A74
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ zabbix_server_history_types:

# SELinux specific
selinux_allow_httpd_can_connect_ldap: false
selinux_allow_httpd_can_network_connect_db: false
selinux_allow_httpd_can_connect_zabbix: false
selinux_allow_httpd_can_connect_zabbix: true
selinux_allow_httpd_can_network_connect_db: true

zabbix_repo_deb_gpg_key_url: http://repo.zabbix.com/zabbix-official-repo.key
zabbix_repo_deb_include_deb_src: true
Expand Down
0