-
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
1 parent
deb283a
commit dac47b4
Showing
11 changed files
with
66 additions
and
39 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
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
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
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
16 changes: 5 additions & 11 deletions
16
ansible_load_balancer/roles/ansible-role-nginx/tasks/selinux.yml
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 |
---|---|---|
@@ -1,13 +1,7 @@ | ||
--- | ||
- name: Permanently set SElinux to allow nginx to set rlimit | ||
shell: setsebool -P httpd_can_network_connect 1 | ||
- name: Install the selinux python module | ||
package: name={{ nginx_python_selinux_pkgs | default(omit) }} state=present | ||
when: ansible_os_family == "RedHat" or ansible_os_family == "Debian" | ||
|
||
# I had to change this to an imperative command. The original ansible module just doesn't get the job done: | ||
|
||
#--- | ||
#- name: Install the selinux python module | ||
# package: name={{ nginx_python_selinux_pkgs | default(omit)}} state=present | ||
# when: ansible_os_family == "RedHat" or ansible_os_family == "Debian" | ||
# | ||
#- name: Set SELinux boolean to allow nginx to set rlimit | ||
# seboolean: name=httpd_setrlimit state=yes persistent=yes | ||
- name: Set SELinux boolean to allow nginx to set rlimit | ||
seboolean: name=httpd_setrlimit state=yes persistent=yes |
8 changes: 8 additions & 0 deletions
8
ansible_load_balancer/roles/ansible-role-nginx/vars/Debian-12.yml
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,8 @@ | ||
--- | ||
nginx_user: www-data | ||
|
||
nginx_python_selinux_pkgs: | ||
- python3-selinux | ||
- python3-semanage | ||
|
||
nginx_modules_location: /usr/lib/nginx/modules |
4 changes: 2 additions & 2 deletions
4
ansible_load_balancer/roles/ansible-role-nginx/vars/RedHat.yml
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
nginx_python_selinux_pkgs: | ||
- libselinux-python | ||
- libsemanage-python | ||
- python3-libselinux | ||
- python3-libsemanage | ||
|
||
nginx_modules_location: /usr/lib64/nginx/modules | ||
|