--- - name: "[Alpine] Install extra PHP{{ services.php_fpm.version | default(7) }} modules" apk: name: "php{{ services.php_fpm.version | default(7) }}-{{ item }}" state: present loop: "{{ query('list', services.php_fpm.extraModules)[0] }}" when: - ansible_distribution == "Alpine" - name: "[Archlinux] Install extra PHP7 modules" pacman: name: "php7-{{ item }}" state: present loop: "{{ query('list', services.php_fpm.extraModules)[0] }}" when: - ansible_distribution == "Archlinux" - services.php_fpm.version is not defined or services.php_fpm.version == 7 - name: "[Archlinux] Install extra PHP8 modules" pacman: name: "php-{{ item }}" state: present loop: "{{ query('list', services.php_fpm.extraModules)[0] }}" when: - ansible_distribution == "Archlinux" - services.php_fpm.version == 8