From ac860e72f200138b79827a343b1224fd50c52b3c Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Fri, 1 Jan 2021 19:54:12 +0200 Subject: [PATCH] roles/php-fpm: Only run PHP tasks if we need them --- roles/php-fpm/tasks/Debian_10.yml | 1 + roles/php-fpm/tasks/Ubuntu_18.04.yml | 1 + roles/php-fpm/tasks/Ubuntu_20.04.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/roles/php-fpm/tasks/Debian_10.yml b/roles/php-fpm/tasks/Debian_10.yml index cee0af5..e3957c9 100644 --- a/roles/php-fpm/tasks/Debian_10.yml +++ b/roles/php-fpm/tasks/Debian_10.yml @@ -32,5 +32,6 @@ template: src=php7.3-php.ini.j2 dest=/etc/php/7.3/fpm/php.ini owner=root group=root mode=0644 notify: reload php7.3-fpm tags: php-fpm + when: (item.has_wordpress is defined and item.has_wordpress) or (item.needs_php is defined and item.needs_php) # vim: set ts=2 sw=2: diff --git a/roles/php-fpm/tasks/Ubuntu_18.04.yml b/roles/php-fpm/tasks/Ubuntu_18.04.yml index 4b53dc4..35d42d2 100644 --- a/roles/php-fpm/tasks/Ubuntu_18.04.yml +++ b/roles/php-fpm/tasks/Ubuntu_18.04.yml @@ -32,5 +32,6 @@ template: src=php7.2-php.ini.j2 dest=/etc/php/7.2/fpm/php.ini owner=root group=root mode=0644 notify: reload php7.2-fpm tags: php-fpm + when: (item.has_wordpress is defined and item.has_wordpress) or (item.needs_php is defined and item.needs_php) # vim: set ts=2 sw=2: diff --git a/roles/php-fpm/tasks/Ubuntu_20.04.yml b/roles/php-fpm/tasks/Ubuntu_20.04.yml index c87ee11..560f089 100644 --- a/roles/php-fpm/tasks/Ubuntu_20.04.yml +++ b/roles/php-fpm/tasks/Ubuntu_20.04.yml @@ -32,5 +32,6 @@ template: src=php7.4-php.ini.j2 dest=/etc/php/7.4/fpm/php.ini owner=root group=root mode=0644 notify: reload php7.4-fpm tags: php-fpm + when: (item.has_wordpress is defined and item.has_wordpress) or (item.needs_php is defined and item.needs_php) # vim: set ts=2 sw=2: