geerlingguy / ansible-role-php

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

Unable to set `pm.status_path` #350

Closed doenietzomoeilijk closed 2 years ago

doenietzomoeilijk commented 2 years ago

Title says it all, really; the current template and vars don't allow you to set pm.status_path for a pool, unless I'm missing something obvious — which is far from impossible.

Is this an actual decision or just something that simply never came up and that you're willing to receive a PR for?

geerlingguy commented 2 years ago

I think it might be simpler (and more flexible) to add in a variable like php_fpm_extra_settings, and then you could define additional settings (any from https://www.php.net/manual/en/install.fpm.configuration.php that aren't already covered).

Then you could define in your playbook:

php_fpm_extra_settings: |
  pm.status_path = /my/path/here

To achieve that, in the existing template, we'd just need to add a line at the bottom:

{{ php_fpm_extra_settings }}

And in defaults/main.yml, a new setting like:

php_fpm_extra_settings: ''

(And a line documenting the new setting in README.)

shakalandy commented 2 years ago

this would be super helpful, indeed.

But what about folks using multiple pools via php_fpm_pools? Would this extra setting be added to all of the pools? Same values make sense if only defined "per pool", or?

geerlingguy commented 2 years ago

@shakalandy - I think (at least from my experience, with smaller installations / single sites), we're starting to get into more narrow use cases, and at that point I'd rather someone forks the role and tailors it to their use case better.

steinbrueckri commented 2 years ago

@geerlingguy @shakalandy I have opened a PR for this topic.

marcin-github commented 2 years ago

It would also fix a couple of other issues (e.g. about clear_env ) and it would fix my issue - because I can't set own environment variables in pool.

stale[bot] commented 2 years ago

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

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

stale[bot] commented 2 years ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

marcin-github commented 2 years ago

not stale