So manually doing a composer install on the web server works fine, but not when Trellis (ansible) does it on the same server in a task?
What if Trellis (ansible) does not use SSH Agent Forwarding, this would explain this behavior.
Well not inside the VM, but locally on the host yes!
Where would you configure this? We both have this in the ansible.cfg:
[ssh_connection]
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s
retries = 1