Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config for PHP CLI #1261

Merged
merged 1 commit into from
Jan 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions roles/php/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@
when: php72_status.stat.exists
notify: reload php-fpm

- name: PHP configuration file
- name: Copy PHP-FPM configuration file
template:
src: php.ini.j2
src: php-fpm.ini.j2
dest: /etc/php/7.4/fpm/php.ini
notify: reload php-fpm

- name: Copy PHP CLI configuration file
template:
src: php-fpm.ini.j2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be?

-     src: php-fpm.ini.j2 
+     src: php-cli.ini.j2 

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tangrufus you're right. I've missed it. Should I submit another PR to fix that? /cc @swalkinshaw ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dest: /etc/php/7.4/cli/php.ini
20 changes: 20 additions & 0 deletions roles/php/templates/php-cli.ini.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
; {{ ansible_managed }}

[PHP]
error_reporting = {{ php_error_reporting }}
sendmail_path = {{ php_sendmail_path }}
track_errors = {{ php_track_errors }}
expose_php = Off
date.timezone = {{ php_timezone }}

[mysqlnd]
mysqlnd.collect_memory_statistics = {{ php_mysqlnd_collect_memory_statistics }}

[opcache]
opcache.enable = {{ php_opcache_enable }}
opcache.enable_cli = {{ php_opcache_enable_cli }}
opcache.memory_consumption = {{ php_opcache_memory_consumption }}
opcache.interned_strings_buffer = {{ php_opcache_interned_strings_buffer }}
opcache.max_accelerated_files = {{ php_opcache_max_accelerated_files }}
opcache.revalidate_freq = {{ php_opcache_revalidate_freq }}
opcache.fast_shutdown = {{ php_opcache_fast_shutdown }}
File renamed without changes.