I’m trying to run the server playbook to provision my staging server (which is on a DO droplet), and I keep getting this error when I run the ansible-playbook command.
[WARNING]: Failure using method (v2_playbook_on_play_start) in callback plugin
(<ansible.plugins.callback./Users/mero/dimensionsixdesign.com/trellis/lib/trell
is/plugins/callback/vars.CallbackModule object at 0x1121ca910>): Syntax Error
while loading YAML. mapping values are not allowed in this context The error
appears to have been in '/Users/mero/dimensionsixdesign.com/trellis/group_vars/
staging/wordpress_sites.yml': line 9, column 20, but may be elsewhere in the
file depending on the exact syntax problem. The offending line appears to be:
- canonical: d6dstaging.com redirects: ^ here
ERROR! Syntax Error while loading YAML.
mapping values are not allowed in this context
The error appears to have been in '/Users/mero/dimensionsixdesign.com/trellis/group_vars/staging/wordpress_sites.yml': line 9, column 20, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- canonical: d6dstaging.com
redirects:
^ here
I had commented out the redirects directives so that I can also use the www prefix for the website, but I keep getting the error showed above. Not sure what to do to fix this. Server setup works if I comment those lines back out, but I want both www and non-www.
This is with Trellis 1.0.0. I didn’t see anything in the commits that have come since to suggest that an update to Trellis would fix this issue.
I’m running on a Mac running 10.14.3 with Ansible 2.7.5.