geerlingguy / ansible-role-php

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

Does not install correct version of PHP on EL 8 (>= 8.6) #383

Closed g0blin79 closed 9 months ago

g0blin79 commented 1 year ago

I'm using this role in a playbook that I need to run on RHEL both 7.9 and 8.6. PHP version I need to install is 7.4 on both versions.

This is my config (very simple)

  roles:
    - role: geerlingguy.php
      php_enablerepo: "remi-php74,epel"

On machines using RHEL 7.9 no problem, all goes well. At the end of my playbook, PHP 7.4.32 is correctly installed. On machines using RHEL 8.6, the PHP version installed is the 7.2.24 (probably the default version).

This probably because on EL 8.x I need to reset default PHP module and set the new module I need to use, before to install php packages. In my case something like this:

$ sudo dnf module reset php -y
$ sudo dnf module install php:remi-7.4

@see here, for example: https://computingforgeeks.com/how-to-install-php-7-4-on-centos-rhel-8/.

If I run this commands manually on my machine and then I relaunch the playbook, all goes well.

g0blin79 commented 1 year ago

@here: https://github.com/geerlingguy/ansible-role-php/pull/384 my pull request

stale[bot] commented 1 year 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.

g0blin79 commented 1 year ago

Hey all! Is this project still active? I opened this issue 8 months ago...no reply... I did a PR (https://github.com/geerlingguy/ansible-role-php/pull/384) same day...no reply...staled and now closed...

During my fix I tried testing with molecule...but molecule test failed due to a problem with docker image (and not for my fix)...

I'm using this project for work and I should know If i can count on it or not...

github-actions[bot] commented 11 months 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.

github-actions[bot] commented 9 months 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.