Trellis suddenly stopped working!

Trellis can’t take my build to production anymore. The error I am getting after deploy.sh command is:
fatal: [my.server.ip]: FAILED! => {"failed": true, "msg": "template error while templating string: Missing end of comment tag. String: }^g+.F+P-HW {#OCbc^XPiCV %}E+?b*5^79~,<}~5UXTdCej~*~qHlNUT3ye0k@"} to retry, use: --limit @deploy.retry

This comes after task: TASK [deploy : Copy project local files]

When I tried doing fresh server and make install with Ansible with command
ansible-playbook server.yml -e env=production
at some point it gives the same error as before.

I also tried to revert to older versions of my repo and it didn’t work either. I also tried reinstalling Ansible to my computer. I haven’t touched Ansible files at all. This error just started suddenly and I have no idea what to do :frowning:

Given the nature of the string it erred on, it looks like one of the salts is causing you an issue.
Try generating new salts in the YAML format from https://roots.io/salts.html

Also please make sure that your version of Ansible is up to date.

3 Likes

It works!!! Thank you for this!!! You saved my ass :slight_smile:

the yaml format can still produce this error. i removed the characters {#} and it fixed the issue, see here https://github.com/ansible/ansible/issues/16443

1 Like

I’ve also found the roots salts can cause issues. Dealing with that now. To solve, it’s pretty easy;

  • Open the vault file for the environment you’re deploying
  • Search and find the salt which is causing issues
  • Replace this salt with a fresh one from https://roots.io/salts.html