-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
- name: Check for SELinux port definition conflicts | ||
shell: | ||
cmd: "semanage port -l | grep ' tcp ' | grep -P ' {{ se_conflict_item }}(,| |$)' | awk '{print $1}'" | ||
changed_when: false | ||
failed_when: false | ||
loop: | ||
- "{{ eff_host_port }}" | ||
- "{{ eff_proxy_port }}" | ||
loop_control: | ||
loop_var: se_conflict_item | ||
register: se_conflict_check | ||
when: (eff_proxy_port | string not in stock_http_cache_ports | string) or (eff_host_port | string not in stock_http_ports | string) | ||
|
||
- debug: | ||
msg: "{% if se_conflict_output.stdout | length and se_conflict_output.stdout != 'http_port_t' and se_conflict_output.stdout != 'http_cache_port_t' %}Warning: port {{ se_conflict_output.se_conflict_item }} seems to conflict with the definition of '{{ se_conflict_output.stdout }}', module installation will likely fail.{% else %}No SELinux port conflict detected.{% endif %}" | ||
loop: "{{ se_conflict_check.results }}" | ||
loop_control: | ||
loop_var: se_conflict_output | ||
label: "{{ se_conflict_output.se_conflict_item }}" | ||
when: not se_conflict_check.skipped | ||
|
||
- include_role: | ||
name: noobient.selinux_cil | ||
vars: | ||
module: "noobient-nginx_{{ domain }}" | ||
custom_src: noobient-nginx_custom | ||
when: (eff_proxy_port | string not in stock_http_cache_ports | string) or (eff_host_port | string not in stock_http_ports | string) |