From 28ff578bd2bc27cbc4773ffe28c08b1d9fd4e2b2 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 27 Apr 2020 16:23:45 +0200 Subject: [PATCH] Limit the php related tasks to the wordpress pool(s) only. --- defaults/main.yml | 2 +- tasks/wp_nginx.yml | 2 +- tasks/wp_prerequisites.yml | 2 +- vars/main.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 9993e26..f6a7e5b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -65,5 +65,5 @@ wordpress_upload_max_filesize: 32M nginx_client_max_body_size: '{{ wordpress_upload_max_filesize }}' phpfpm_allow_url_fopen: '{{ wordpress_phpfpm_allow_url_fopen }}' phpfpm_max_execution_time: '{{ wordpress_phpfpm_max_execution_time }}' -phpfpm_pools: '{{ wordpress_phpfpm_pools }}' +phpfpm_pools: '{{ wordpress_phpfpm_pool }}' diff --git a/tasks/wp_nginx.yml b/tasks/wp_nginx.yml index 47c6d0c..249e11d 100644 --- a/tasks/wp_nginx.yml +++ b/tasks/wp_nginx.yml @@ -2,7 +2,7 @@ - block: - name: Install the nginx virtualhost template: src=nginx_wordpress.conf.j2 dest=/etc/nginx/sites-available/wordpress.conf mode=0444 - with_items: '{{ phpfpm_pools }}' + with_items: '{{ wordpress_phpfpm_pools }}' notify: Reload nginx - name: Enable the nginx virtualhost diff --git a/tasks/wp_prerequisites.yml b/tasks/wp_prerequisites.yml index b59ab6e..c3cebeb 100644 --- a/tasks/wp_prerequisites.yml +++ b/tasks/wp_prerequisites.yml @@ -8,7 +8,7 @@ - name: Create the wordpress document root file: dest={{ wordpress_doc_root }} state=directory owner={{ item.user }} group={{ item.group }} - with_items: '{{ phpfpm_pools }}' + with_items: '{{ wordpress_phpfpm_pools }}' tags: wordpress diff --git a/vars/main.yml b/vars/main.yml index c2abfb8..b5fcc48 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -33,5 +33,5 @@ phpfpm_default_user: '{{ wordpress_system_user }}' wordpress_phpfpm_allow_url_fopen: 'on' wordpress_phpfpm_max_execution_time: '240' -wordpress_phpfpm_pools: +wordpress_phpfpm_pool: - { pool_name: '{{ phpfpm_default_pool_name }}', app_context: '{{ phpfpm_default_context }}', user: '{{ phpfpm_default_user }}', group: '{{ phpfpm_default_group }}', listen: '{{ wordpress_php_listen }}', allowed_clients: '{{ phpfpm_default_allowed_clients }}', pm: '{{ phpfpm_default_pm }}', pm_max_children: '{{ phpfpm_default_pm_max_children }}', pm_start_servers: '{{ phpfpm_default_pm_start_servers }}', pm_min_spare: '{{ phpfpm_default_pm_min_spare_servers }}', pm_max_spare: '{{ phpfpm_default_pm_max_spare_servers }}', pm_max_requests: '{{ phpfpm_default_pm_max_requests }}', pm_status_enabled: '{{ phpfpm_default_pm_status_enabled }}', pm_status_path: '{{ phpfpm_default_pm_status_path }}', ping_enabled: '{{ phpfpm_default_ping_enabled }}', ping_path: '{{ phpfpm_default_ping_path }}', ping_response: '{{ phpfpm_default_ping_response }}', display_errors: '{{ phpfpm_default_display_errors }}', log_errors: '{{ phpfpm_default_log_errors }}', memory_limit: '{{ phpfpm_default_memory_limit }}', slowlog_timeout: '{{ phpfpm_default_slowlog_timeout }}', rlimit_files: '{{ phpfpm_default_rlimit_files }}', php_extensions: '{{ phpfpm_default_extensions }}', define_custom_variables: '{{ phpfpm_default_define_custom_variables }}', admin_write: True, doc_root: '{{ wordpress_doc_root }}', virthost: '{{ wordpress_servername }}', virthost_aliases: "{{ wordpress_aliases | default('') }}" }