Skip to content

Commit

Permalink
Fixed Selinux Var
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrodie18 committed Jun 6, 2024
1 parent 9906074 commit 6a53837
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/ZABBIX_AGENT_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ The following is an overview of all available configuration default for this rol

### SElinux

* `zabbix_selinux`: Default: `False`. Enables an SELinux policy so that the server will run.
* `zabbix_agent_selinux`: Default: `False`. Enables an SELinux policy so that the server will run.
* `selinux_allow_zabbix_run_sudo`: Default: `False`. Enable Zabbix root access on system.

### Zabbix Agent
Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_agent/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ zabbix_agent_sender_package: "{{ zabbix_sender_package }}"
zabbix_get_package: zabbix-get # Depricate in 3.0
zabbox_agent_get_package: "{{ zabbix_get_package }}"
zabbix_agent_package_state: present
zabbix_selinux: false
zabbix_agent_selinux: false
zabbix_agent_conf_mode: "0644"
zabbix_agent_dont_detect_ip: false

Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_agent/tasks/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
- name: "Configure SELinux when enabled"
ansible.builtin.include_tasks: selinux.yml
when:
- zabbix_selinux | bool
- zabbix_agent_selinux | bool | default (false)

- name: "Adding zabbix group"
ansible.builtin.group:
Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_agent/tasks/selinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

- name: "SELinux | Set zabbix_selinux to true if getenforce returns Enforcing or Permissive"
ansible.builtin.set_fact:
zabbix_selinux: "{{ true }}"
zabbix_agent_selinux: "{{ true }}"
when:
- 'getenforce_bin.stat.exists and ("Enforcing" in sestatus.stdout or "Permissive" in sestatus.stdout)'
tags:
Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_proxy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
- name: "Configure SELinux when enabled"
ansible.builtin.include_tasks: selinux.yml
when:
- zabbix_proxy_selinux | bool
- zabbix_proxy_selinux | bool | default (false)
- ansiblle_os_family == "RedHat"

- name: "Install zabbix-proxy packages"
Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
- name: "Configure SELinux when enabled"
ansible.builtin.include_tasks: selinux.yml
when:
- zabbix_proxy_selinux | bool
- zabbix_server_selinux | bool | default (false)
- ansiblle_os_family == "RedHat"

- name: Install zabbix-server packages
Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_web/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
- name: "Configure SELinux when enabled"
ansible.builtin.include_tasks: selinux.yml
when:
- zabbix_web_selinux | bool
- zabbix_web_selinux | bool | default (false)

0 comments on commit 6a53837

Please sign in to comment.