-
-
Notifications
You must be signed in to change notification settings - Fork 441
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
Separate templates for CLI php.ini? #140
Comments
I'd also like to only override the default maybe allow
|
or even easier an override var per SAPI like
could create |
Might try to tackle a PR for this over the next week or so but would need to know the best approach for overriding http://www.php.net/manual/en/configuration.file.php Is using a |
It looks like downstream issue geerlingguy/ansible-role-php-xdebug#34 will need this as well. On CentOS/RHEL, where config is typically much simpler (e.g. don't have some crazy set of potentially dozens of config files), you would generally have one CLI config file, and |
From what I can tell there's no standard way to set only overrides for a single SAPI in CentOS, so whilst it's crazy to have dozens of config files they do provide an easy way to manage overrides. In this case I'd only need to create and single conf file with 2 lines rather than duplicating the whole php conf file.
|
CentOS 7 (PHP7)
Ubuntu 14.04 (PHP7)
CentOS does support We probably just need to have different configuration tasks for each OS.. @geerlingguy I'm happy to put together a PR but would it be accepted if this role primarily supports RHEL? |
I'm fairly new to ansible, but wouldn't it be possible to use this role twice and pass two different variable files to it to configure fpm and cli differently? See my thinking below: - host: xyz
roles:
- role: geerlingguy.php
include_vars: cli.yml
- role: geerlingguy.php
include_vars: fpm.yml where cli.yml is something like: php_conf_paths:
- /etc/php/7.0/cli
php_extension_conf_paths:
- /etc/php/7.0/cli/conf.d
php_expose_php: "On"
php_memory_limit: "-1"
php_session_save_handler: "files"
php_session_save_path: "" and something similar for fpm setting the |
@jradtilbrook you solution should work if you're not also using geerlingguy.php-versions, because it sets
You're right it is a bit gross, since the roll is being run twice it kind of breaks idempotency. But I'm only running it once when I build an AMI/vagrant box so I'm not too worried. |
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. |
I'm currently using the workaround @ndench proposed. It's not a perfect solution but it works for now. |
This issue is no longer marked for closure. |
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. |
Bumping this out of the |
This issue is no longer marked for closure. |
Please review my just-submitted MR, which should work for Debian-based OSes at least: #347. |
I think we should figure out a way to have either separate templates or separate variables for php.ini for CLI.
For example often there will be no memory limit for CLI.
Not sure the best approach here, but perhaps the CLI php.ini is an exception and we should add a separate template and variables for it?
Just a thought!
The text was updated successfully, but these errors were encountered: