ansible-roles/php/tasks/config_cli.yml
Ludovic Poujol f135f67cd0
All checks were successful
continuous-integration/drone/push Build is passing
(change) php: Cleanup CLI Settings. Also, allow url fopen and don't disable functions (in CLI only)
Closes #98
2020-04-01 18:22:46 +02:00

39 lines
1 KiB
YAML

---
- name: "Set default php.ini values for CLI"
ini_file:
dest: "{{ php_cli_defaults_ini_file }}"
section: PHP
option: "{{ item.option }}"
value: "{{ item.value }}"
mode: "0644"
create: yes
with_items:
- { option: "display_errors", value: "On" }
- { option: "allow_url_fopen", value: "On" }
- { option: "disable_functions", value: "" }
- name: Custom php.ini for CLI
copy:
dest: "{{ php_cli_custom_ini_file }}"
content: |
; Put customized values here.
force: no
# This task is not merged with the above copy
# because "force: no" prevents any fix after the fact
- name: "Permissions for custom php.ini for CLI"
file:
dest: "{{ php_cli_custom_ini_file }}"
mode: "0644"
- name: "Set custom values for PHP to enable Symfony"
ini_file:
dest: "{{ php_cli_custom_ini_file }}"
section: PHP
option: "{{ item.option }}"
value: "{{ item.value }}"
mode: "0644"
with_items:
- { option: "date.timezone", value: "Europe/Paris" }
when: php_symfony_requirements