ansible-roles/php/tasks/config_cli.yml

39 lines
1.1 KiB
YAML
Raw Permalink Normal View History

---
- name: "Set default php.ini values for CLI"
community.general.ini_file:
dest: "{{ php_cli_defaults_ini_file }}"
section: PHP
option: "{{ item.option }}"
value: "{{ item.value }}"
mode: "0644"
create: yes
loop:
- { option: "display_errors", value: "On" }
- { option: "allow_url_fopen", value: "On" }
- { option: "disable_functions", value: "" }
- name: Custom php.ini for CLI
ansible.builtin.copy:
dest: "{{ php_cli_custom_ini_file }}"
content: |
; Put customized values here.
2023-06-28 13:22:59 +02:00
force: false
2017-09-06 19:28:37 +02:00
# This task is not merged with the above copy
2023-06-28 13:22:59 +02:00
# because "force: false" prevents any fix after the fact
- name: "Permissions for custom php.ini for CLI"
ansible.builtin.file:
dest: "{{ php_cli_custom_ini_file }}"
mode: "0644"
- name: "Set custom values for PHP to enable Symfony"
community.general.ini_file:
dest: "{{ php_cli_custom_ini_file }}"
2017-09-06 19:28:37 +02:00
section: PHP
option: "{{ item.option }}"
value: "{{ item.value }}"
mode: "0644"
loop:
2018-06-11 14:15:19 +02:00
- { option: "date.timezone", value: "Europe/Paris" }
when: php_symfony_requirements | bool