On Thursday, 8 August 2019 09:55:58 UTC+1, Kai Stian Olstad wrote:
>
> On 08.08.2019 10:50, 'Richard Payne' via Ansible Project wrote: 
> > Hi Kai 
> > 
> > This: 
> > Port: {{ range(43000,43200) | list }} 
> > 
> > produces: 
> > ERROR! Syntax Error while loading YAML. 
> >    found unacceptable key (unhashable type: 'AnsibleMapping') 
> > The offending line appears to be: 
> > 
> > 
> >      HostName: "+" 
> >      Port: {{ range(43000,43200) | list }} 
> >             ^ here 
> > 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: 
>
> As the error message says you need to add quotes. 
> When a { comes after a colon you need to quote it with single or double 
> quotes. 
>
>   Port: "{{ range(43000,43200) | list }}" 
>
>
> -- 
> Kai Stian Olstad 
>

Sure, but then I'm passing a single string to an int array. 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/78ef4a39-327f-4206-9461-d9c102c214c5%40googlegroups.com.

Reply via email to