From a60ee2dcd0311ce7b8fce6560e04b69273792bff Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Tue, 11 Jun 2019 19:02:29 +0200 Subject: [PATCH] ansible-playbooks/general#85 Name set_fact tasks --- tasks/php.yml | 6 ++++-- tasks/variables.yml | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tasks/php.yml b/tasks/php.yml index 44d273d..48021c4 100644 --- a/tasks/php.yml +++ b/tasks/php.yml @@ -159,11 +159,13 @@ when: (php_version_main|default('7') == '7') and (jailkit is not defined or not jailkit) and (php_fpm) - block: - - set_fact: + - name: Set facts for PHP 7 + set_fact: phpLogRotatePrefix: '{{php_version|default("7.0")}}' phpLibPrefix: '' when: php_version_main|default('7') == '7' - - set_fact: + - name: Set facts for PHP 5 + set_fact: phpLogRotatePrefix: '5' phpLibPrefix: '5' when: php_version_main|default('7') != '7' diff --git a/tasks/variables.yml b/tasks/variables.yml index c332577..9300fda 100644 --- a/tasks/variables.yml +++ b/tasks/variables.yml @@ -2,12 +2,15 @@ # file: roles/php/tasks/variables.yml - block: - - set_fact: + - name: Set default facts + set_fact: phpFpmService: php5-fpm - - set_fact: + - name: Set facts for PHP 5 + set_fact: phpFpmService: php-fpm when: php_version_main|default('7') == '5' - - set_fact: + - name: Set facts for PHP 7 + set_fact: phpFpmService: php{{php_version|default("7.0")}}-fpm when: php_version_main|default('7') == '7' tags: -- GitLab