roots / trellis

WordPress LEMP stack with PHP 8.2, Composer, WP-CLI and more
https://roots.io/trellis/
MIT License
2.51k stars 607 forks source link

missing php_extensions_default when provisioning sshd #1532

Closed aymanrady closed 3 months ago

aymanrady commented 3 months ago

Version

1.22.1

What did you expect to happen?

The provisioning to complete without issues

What actually happens?

Failure in [common : Verify dict format for apt package component variables]

Steps to reproduce

trellis provision --tags=sshd staging

System info

Ubuntu 20.04

Log output

TASK [common : Verify dict format for apt package component variables] *********
fatal: [x.x.x.x]: FAILED! => {"msg": "The conditional check 'package_vars_wrong_format | count' failed. The error was: error while evaluating conditional (package_vars_wrong_format | count): [{% for k,v in package_vars.items() | list if v | type_debug != 'dict' %}'{{ k }}',{% endfor %}]: {'apt_packages_default': '{{ apt_packages_default }}', 'apt_packages_custom': '{{ apt_packages_custom }}', 'memcached_packages_default': '{{ memcached_packages_default }}', 'memcached_packages_custom': '{{ memcached_packages_custom }}', 'php_extensions_default': '{{ php_extensions_default }}', 'php_extensions_custom': '{{ php_extensions_custom }}', 'sshd_packages_default': '{{ sshd_packages_default }}', 'sshd_packages_custom': '{{ sshd_packages_custom }}'}: 'php_extensions_default' is undefined\n\nThe error appears to be in '/home/me/project/trellis/roles/common/tasks/main.yml': line 56, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Verify dict format for apt package component variables\n  ^ here\n"}

Please confirm this isn't a support request.

Yes

aymanrady commented 3 months ago

The include php vars task is not running https://github.com/roots/trellis/blob/ab4226b8f9509f7570580892c2210bbbda9e3db7/roles/common/tasks/main.yml#L39-L49

swalkinshaw commented 3 months ago

What's php_version set to in group_vars/all/main.yml. Here's the default: https://github.com/roots/trellis/blob/b9eb66fe91ca19aaf43badaf2092cc5d194b74a7/group_vars/all/main.yml#L6

aymanrady commented 3 months ago

php_version is the default value, it's that the Import PHP version specific vars task is not tagged sshd

swalkinshaw commented 3 months ago

Ah sorry I missed that at first. See https://github.com/roots/trellis/pull/1544