Error while deploying open source bitcoin exchange platform that uses ansimble

26 views
Skip to first unread message

Oleg Belousov

unread,
Jul 10, 2016, 3:02:00 PM7/10/16
to Ansible Project
This is the line with the error:

This is how the error looks like in the console:

fatal: [longcat.staging-testnet-txbits.com] => Syntax Error while loading YAML script, /home/user/dev/TxBitsDeployer/playbook/group_vars/staging_testnet
Note: The error may actually appear before this position: line 5, column 29

# for webservers
frontend_fqdn:             {{root_domain}}
                            ^
This one looks easy to fix.  YAML thought it was looking for the start of a 
hash/dictionary and was confused to see a second "{".  Most likely this was
meant to be an ansible template evaluation instead, so we have to give the 
parser a small hint that we wanted a string instead. The solution here is to 
just quote the entire value.

For instance, if the original line was:

    app_path: {{ base_path }}/foo

It should be written as:

    app_path: "{{ base_path }}/foo"

We could be wrong, but this one looks like it might be an issue with
missing quotes.  Always quote template expression brackets when they 
start a value. For instance:            

    with_items:
      - {{ foo }}

Should be written as:

    with_items:
      - "{{ foo }}"      




What I was trying to do is 
./initial_deploy.sh staging_testnet

In order to test the pipeline.

Thanks in advance.
O.

Oleg Belousov

unread,
Jul 11, 2016, 11:37:41 AM7/11/16
to Ansible Project
up (

Kai Stian Olstad

unread,
Jul 11, 2016, 12:06:13 PM7/11/16
to ansible...@googlegroups.com
On 11. juli 2016 17:37, Oleg Belousov wrote:
> up (
>
> On Sunday, 10 July 2016 21:02:00 UTC+2, Oleg Belousov wrote:
>> # for webservers
>> frontend_fqdn: {{root_domain}}
>> ^
>> This one looks easy to fix. YAML thought it was looking for the start of
>> a
>> hash/dictionary and was confused to see a second "{". Most likely this was
>> meant to be an ansible template evaluation instead, so we have to give the
>> parser a small hint that we wanted a string instead. The solution here is
>> to
>> just quote the entire value.

Have you actually read the error message?
It clearly says whats wrong.

More info
https://docs.ansible.com/ansible/YAMLSyntax.html#gotchas

--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages