This has happened to me with every site I’ve setup using Trellis. So I thought I would see if anyone else runs into this issue.
When pushing my site to the production server I run ansible-playbook server.yml -e env=production. I generated the salts from https://roots.io/salts.html and copied and pasted them into my vault.
ERROR! Syntax Error while loading YAML.
The error appears to have been in '/Users/<user>/Documents/Sites/<mywebsite>/trellis/group_vars/staging/vault.yml': line 15, column 1, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
# Generate your keys here: https://roots.io/salts.html
This one looks easy to fix. It seems that there is a value started
with a quote, and the YAML parser is expecting to see the line ended
with the same kind of quote. For instance:
when: "ok" in result.stdout
Could be written as:
when: '"ok" in result.stdout'
when: "'ok' in result.stdout"
Has anyone else run into the issue?
Have you tried http://codebeautify.org/yaml-validator to validate your YAML syntax?
Also, be sure that when you follow the documentation in that file (
# Generate your keys here: https://roots.io/salts.html) that you grab the appropriate format.
Here are the keys that I copied
I just removed the indenting from the file and now it seems to work. But I’m getting and unreachable error now. Thats another issue but at least removing the indenting worked.
So since you’ve had some syntax issues I highly recommend ruling out further syntax issues by validating any config files you may have modified by using http://codebeautify.org/yaml-validator.
I checked every thing and it checks out without indenting. If I add the indenting back in it gives an error