diff --git a/defaults/main.yml b/defaults/main.yml index c959ed4..a1809c4 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,6 +9,7 @@ php_packages: - php7.0-fpm - php7.0-mysql - php7.0-gd +php_timezone: Europe/Warsaw php_upload_max_filesize: "20M" php_post_max_size: "20M" php_memory_limit: "1024M" \ No newline at end of file diff --git a/tasks/php-cli.yml b/tasks/php-cli.yml index 625a849..938fdcb 100755 --- a/tasks/php-cli.yml +++ b/tasks/php-cli.yml @@ -1,10 +1,10 @@ --- -- name: ensure timezone is set in cli php.ini +- name: Ensure timezone is set in cli php.ini lineinfile: dest=/etc/php/7.0/cli/php.ini regexp='date.timezone =' - line='date.timezone = {{ server.timezone }}' + line='date.timezone = {{ php_timezone }}' -- name: enabling opcache cli +- name: Enabling opcache cli lineinfile: dest=/etc/php/7.0/cli/php.ini - regexp=';opcache.enable_cli=0' + regexp=';?opcache.enable_cli=' line='opcache.enable_cli=1' diff --git a/tasks/php-fpm.yml b/tasks/php-fpm.yml index b5fb896..ee9a0a9 100644 --- a/tasks/php-fpm.yml +++ b/tasks/php-fpm.yml @@ -12,7 +12,7 @@ - name: Ensure timezone is set in fpm php.ini lineinfile: dest=/etc/php/7.0/fpm/php.ini regexp='date.timezone =' - line='date.timezone = {{ server.timezone }}' + line='date.timezone = {{ php_timezone }}' - name: Enabling opcache lineinfile: dest=/etc/php/7.0/fpm/php.ini