---
- block:
  - name: Install the nginx web server
    yum: pkg=nginx state={{ nginx_package_state }}

  - name: nginx must be able to network connect when used as a proxy
    seboolean:
      name: httpd_can_network_connect
      state: yes
      persistent: yes
    when: letsencrypt_acme_install is defined and letsencrypt_acme_install

  - name: Give nginx the ability to set RLIMIT_NOFILE
    seboolean:
      name: httpd_setrlimit
      state: yes
      persistent: yes

  when: ansible_distribution_file_variety == "RedHat"
  tags: nginx