Ansible add pecl or pear extensions

Trellis is working out great but I’m having trouble with understanding where to add configuration for enabling yaml-php during server setup. I’m kind of muddling through this the best I can with very little knoweledge of vagrant or ansible, but wondering if someone could give an example of further configuring the setup of the environments that would be awesome.

You can just add it here:

And then re-provision the server as usual.

I think it requires a bit more work than that. The yaml extension first requires libYAML to be installed. Also, I only see php extensions in the yaml list that come prepackaged with php, whereas php yaml is not - it’s a pecl extension. I could be wrong here…but I tried php7.1-yaml and no dice.

Then you’d need to also add libyaml-dev with a task like this:

- name: Install libyaml
     name: libyaml-dev

Or you could use a pure PHP YAML package:

That way you don’t need to edit anything in Trellis. Just use that as a Composer dependency