You can add the keep_releases
option to this task here: https://github.com/roots/trellis/blob/21ec0aafe600fda12ee1a22feb519b8096065e81/roles/deploy/tasks/finalize.yml#L4-L8
Documentation on the module we use: https://github.com/f500/ansible-project_deploy_module
Although we should add that variable in Trellis so you don’t need to modify a core tasks file. Feel free to open an issue on our repo if you want.