2020-06-02 14:52:24 +02:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Install the nginx web server
|
|
|
|
yum: pkg=nginx state={{ nginx_package_state }}
|
|
|
|
|
2020-08-04 16:34:42 +02:00
|
|
|
- name: nginx must be able to network connect and relay when used as a proxy
|
2020-07-31 12:33:22 +02:00
|
|
|
seboolean:
|
|
|
|
name: httpd_can_network_connect
|
2020-08-04 16:34:42 +02:00
|
|
|
state: 1
|
2020-07-31 12:33:22 +02:00
|
|
|
persistent: yes
|
2020-08-04 16:34:42 +02:00
|
|
|
with_items:
|
|
|
|
- 'httpd_can_network_connect'
|
|
|
|
- 'httpd_can_network_relay'
|
2020-07-31 12:33:22 +02:00
|
|
|
when: letsencrypt_acme_install is defined and letsencrypt_acme_install
|
2020-08-04 16:34:42 +02:00
|
|
|
tags: [ 'nginx', 'nginx_selinux' ]
|
2020-07-31 12:33:22 +02:00
|
|
|
|
2020-08-03 15:16:10 +02:00
|
|
|
- name: Give nginx the ability to set RLIMIT_NOFILE
|
|
|
|
seboolean:
|
|
|
|
name: httpd_setrlimit
|
2020-08-04 16:24:06 +02:00
|
|
|
state: 1
|
2020-08-03 15:16:10 +02:00
|
|
|
persistent: yes
|
2020-08-04 16:34:42 +02:00
|
|
|
tags: [ 'nginx', 'nginx_selinux' ]
|
2020-08-03 15:16:10 +02:00
|
|
|
|
2020-06-02 14:52:24 +02:00
|
|
|
when: ansible_distribution_file_variety == "RedHat"
|
2020-08-04 16:34:42 +02:00
|
|
|
tags: [ 'nginx' ]
|