geerlingguy / ansible-role-php-versions

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

modules need to be reset before enabling another one #68

Closed alexandruz closed 3 years ago

alexandruz commented 3 years ago

When trying to upgrade a previous version the enabled module needs to be reset.

geerlingguy commented 3 years ago

Would this cause issues on the first install, though?

alexandruz commented 3 years ago

no, on default/first install no, only on upgrades. do you think the reset should be handled in a pre-task?

geerlingguy commented 3 years ago

It looks like this PR creates an issue with idempotence:

TASK [geerlingguy.php-versions : Enable DNF module for CentOS 8+.] *************
  changed: [instance]

That's from the failed build in the list above.

alexandruz commented 3 years ago

So, I'm still not sure about whether the problem should be solved by this role, or in a pre_tasks.

A dnf module reset php in the pre_tasks solves this problem - and I'm not sure about the limits of a/this role.

Let's close this (for now), if I find a better reason to deal with this issue in the role, I'll test it some more.

Thanks.