Created
October 4, 2016 18:25
-
-
Save sebastianwebber/36dd536a406db87c76041b9e2d7e0d26 to your computer and use it in GitHub Desktop.
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
- set_fact: | |
events_session: |+ | |
events { | |
worker_connections {{ total_fpm_pools * max_phpfpm_server_per_pool }}; | |
use epoll; | |
multi_accept on; | |
} | |
- name: updating nginx config | |
lineinfile: | |
dest: /etc/nginx/nginx.conf | |
regexp: "{{ item.regexp }}" | |
line: "{{ item.line }}" | |
# backrefs: yes | |
backup: yes | |
state: present | |
with_items: | |
- { regexp: 'worker_rlimit_nofile[ ]{1,}[0-9]{1,}', line: 'worker_rlimit_nofile 100000;' } | |
- { regexp: 'worker_processes[ ]{1,}[0-9a-z]{1,}', line: 'worker_processes auto;' } | |
- { regexp: 'events\s{([^}]*)}', line: "{{ events_session }}" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment