geerlingguy / ansible-role-php

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

Allow the php version to be overridden. #310

Closed dlundgren closed 4 years ago

dlundgren commented 4 years ago

I found out I was unable to specify 7.3 on an Ubuntu 18 installation, and it stemmed from a clean up that enforced the default version being configured on Debian based systems.

JKetelaar commented 4 years ago

+1

wiegandsh commented 4 years ago

+1

shakalandy commented 4 years ago

Hey @geerlingguy - any chance to push that one?

in our condition - having host_vars overwriting defaults this ended in PHP 7.4 being installed (desired state), but PHP 7.2 being configured - where PHP 7.4 should have been configured. With the fix from this PR - this works.

piotrkochan commented 4 years ago

I had to clone and symlink role to my playbook as it is very important for our usecase. @geerlingguy, come on :)

twoequaldots commented 4 years ago

+1. This patch worked for me to use php7.4 on Debian 10. If it helps at all, I've used Ansible 2.9.6 - 2.10.2 for my tests and they all passed. :)

geerlingguy commented 4 years ago

php_default_version_debian should still be able to override this, is it not working?

geerlingguy commented 4 years ago

Ah... looking into this more, this was introduced in https://github.com/geerlingguy/ansible-role-php/commit/1496cf8f92de830842b8be2e1e14981bf1b3e1ae — and that commit helped make the role work better across many versions of distros, but made it so you couldn't override it anymore (which this PR fixes).

But that whitespace issue is from https://github.com/geerlingguy/ansible-role-php/commit/9751de2e2a688d3a521af652f4cff4c255b9734f, which is weird, I'm not sure how I let that sneak in!

twoequaldots commented 4 years ago

Thanks for looking into this and approving the merge, much appreciated =]

shakalandy commented 4 years ago

Thanks also for creating an release for this @geerlingguy 🥇