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
Select PHP version on RedHat #414
Comments
benoistlaurent
added a commit
to benoistlaurent/ansible-role-php
that referenced
this issue
Mar 26, 2024
+1 this would be a good addition to the role. In my circumstance I needed to install php8.1 which required an extra step to add in the remi repo - name: Install remi repository
ansible.builtin.include_role:
name: geerlingguy.repo-remi
- name: Enable php:remi-8.1
command: "dnf module enable -y php:remi-8.1"
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
If I'm not mistaken, one cannot select the PHP version to install on RedHat.
Why is it important?
This is critically important to me because I am developing this role that installs a website that requires PHP >= 7.4 (namely dokuwiki).
Now, in my opinion, my
ansible-role-dokuwiki
is totally responsible for installing the PHP version it requires.Right now, this is done by selecting the appropriate module before running the php role:
ansible-role-dokuwiki/tasks/main.yml
:Also, my role defines
geerlingguy.php
as a dependency inmeta/main.yml
.Problem
As ansible runs the dependencies before the current role tasks, it results in a bug due to RedHat's (rightful) refusal to select a different PHP version after installing certain packages.
Proposed solution
php_default_version_redhat
indefaults/main.yml
tasks/main.yml
Workaround
The workaround would be to select the appropriate PHP module in the playbook that runs
ansible-role-dokuwiki
:server-setup.yml
:This is not acceptable for me, as, again, to me,
ansible-role-dokuwiki
is suppose to install the adequate version of PHP, depending on the dokuwiki version the user is ultimately installing.The text was updated successfully, but these errors were encountered: