Closed shalgrim closed 8 years ago
i've run into this error before @shalgrim, but can't be sure without seeing the nginx_ssl.conf.j2 file. can you post the contents of that? also are you using Ansible 1.9.4?
I'm using ansible 1.9.2 (the book says to install that one).
Attaching my file...other than spacing I don't detect any differences between what's on the site
whats your app name? if it has spaces that might be causing an issue
if it's not app name then likely can get around it by using double quotes for the value after "dest="
Thanks, Matt. App name is cyoa. Adding quotes didn't help:
dest="/etc/nginx/conf.d{{ app_name }}.conf"
A couple of confusing things I had while I was running through the book, and I figure I might have guessed wrong at some point:
Yea, as the current version is written it can be a bit confusing where the files should live. Any Ansible tasks and templates should be on your local development machine so Ansible can execute the tasks and use the templates to generate configuration files on the server.
For 2., can you give specific pages numbers and locations where it's confusing? Any time you see {{ app_name }} in a template or task, it should not be replaced because it's a token. Only in the group_vars file would you want to replace the value with your own app name.
Page 69 of the pdf, where we create cyoa.conf, should that be locally or on the server? (I did it on the server.)
Also on page 69, that is super clear that I'm to change the server name, and I did so.
About that group_vals/all file, then, I've got cyoa set up at the top but then in the chapter four part (page 72), I've got app_name, that's right, right?
But then I left the fqdn as cyoa.mattmakai.com, and that can't be right, can it? It seems obvious now, but it must not have been obvious at the time. (I changed the fqdn to my URL and get the same parsing YAML error.)
All those are correct. Also, the fqdn wouldn't cause the error, although later on that would cause an issue. Want to hop on a google hangout to do a screen share? It'd be helpful to work through this and then I can make it more clear for future readers in the next update so hopefully they don't run into it. Shoot me an email at matthew.makai@gmail.com if you want to do that, my schedule is pretty open this afternoon (pacific time) and tomorrow.
@mattmakai graciously helped me figure out the issue was that .yml files needed things to line up perfectly, and always with spaces, never tabs
I can't run deploy_prod.sh as indicated in step 9 of page 77 of the pdf. I get an error about quotes around brackets, though that doesn't really seem to be the problem.