geerlingguy / ansible-role-php-versions

Ansible Role - PHP Versions
https://galaxy.ansible.com/geerlingguy/php-versions/
MIT License
98 stars 73 forks source link

The goal of this role!? #67

Closed palansher closed 3 years ago

palansher commented 3 years ago

Good day!

Thank you work your work for society!

your role purpose was declared as:

Allows different PHP versions to be installed when using the geerlingguy.php role (or a similar role). This role was originally >built for Drupal VM but was released more generically so others could use an easier mechanism for switching PHP versions.

but we have only one variable to manage versions:

php_version: '7.4'

How, for example, can I install and configure both 7.4 and 8.0 PHP versions on the same PC?

the role always purges other PHP versions:

TASK [geerlingguy.php-versions : Purge PHP version packages (besides the currently chosen php_version).] 
TASK [geerlingguy.php-versions : Also purge php-common package if any versions were just purged.] 

different PHP versions to be installed

What do you mean by 'different'? It would be great if you clarify and provide some examples how to use this role along with your 'pair ''PNP' role.

All the best!

geerlingguy commented 3 years ago

By different, it means you can install from among a range of supported PHP versions (e.g. either 7.4, 8.0, etc.), but this role does not support installing multiple PHP versions at the same time, at least not directly.

That would be left to the user to figure out—I typically only build one version of PHP on my servers and/or Docker container images, because it solves a lot of headaches.