dokuwiki: find installed PHP version without running commands

So that it works in check mode.
This commit is contained in:
Timotej Lazar 2024-05-28 12:54:50 +02:00
parent ce80765560
commit 3b246447cf

View file

@ -2,14 +2,12 @@
package:
name: acl,php,php-fpm
- name: Find PHP package
command: apk info -e php
register: php_package
changed_when: false
- name: Get installed packages
package_facts:
- name: Set PHP version
set_fact:
php_version: "{{ php_package.stdout | regex_search('[0-9.]+') }}"
php_version: "{{ ansible_facts.packages | select('match', '^php[0-9]+$') | first | replace('php', '') }}"
- name: Set PHP-FPM settings
lineinfile: