geerlingguy / ansible-role-php

Ansible Role - PHP
https://galaxy.ansible.com/geerlingguy/php/
MIT License
492 stars 442 forks source link

Issue #140: Added a memory-limit setting for the CLI #347

Open colans opened 2 years ago

colans commented 2 years ago

As per #140, we need a way to set a different memory limit on the CLI.

This should work for the Debian family, at least.

Cherry-picked from https://github.com/consensus-enterprises/ansible-role-php/commit/f59f2965a072c1ca7aef4f86cdafdb225f77e880.

colans commented 2 years ago

I fixed all of the Lint problems except for something in the "Unchanged files with check annotations" section, which I didn't want to touch because it has nothing to do with this issue.

Lusitaniae commented 2 years ago

+1

if all issues have been addressed and the CI is passing we could merge?

stale[bot] commented 2 years ago

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark pull requests as stale.

racke commented 2 years ago

Sounds good to me.

stale[bot] commented 2 years ago

This issue is no longer marked for closure.

stale[bot] commented 2 years ago

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark pull requests as stale.

colans commented 2 years ago

This is still ready for merging.

stale[bot] commented 2 years ago

This issue is no longer marked for closure.

jonpugh commented 1 year ago

Looking over the existing Ansible tasks, the role writes the same PHP.ini for each of the php_conf_paths list.

Default includes fpm, apache2, cli.

Maybe a different approach could be to allow overriding template vars just for the specified conf file?

Not exactly sure how this could be done, but I'm going to look into it.

Or, overrides could be added to the conf.d dir as well...

Will keep you posted.

__php_conf_paths:
  - "/etc/php/{{ php_version }}/fpm"
  - "/etc/php/{{ php_version }}/apache2"
  - "/etc/php/{{ php_version }}/cli"
__php_extension_conf_paths:
  - "/etc/php/{{ php_version }}/fpm/conf.d"
  - "/etc/php/{{ php_version }}/apache2/conf.d"
  - "/etc/php/{{ php_version }}/cli/conf.d"