I want my filedet.yaml to look like 

10.9.75.78: /app/tmp/tmp.log, /vars/tmp/test.out
> 10.9.55.74: /app/tmp/tmp1.log, /vars/tmp/admin.out


The below works fine and logs the data correctly but when i add ': ' the 
syntax breaks and I get error

 - name: Logging the deployment's file details to a Ansible variable file
     local_action: lineinfile line={{ inventory_hostname }}': '{{ vars['
fdetails_' +  Layer].results|map(attribute='stdout')|list }} path={{ 
playbook_dir }}/vars/filedets.yaml


Output Error:

The offending line appears to be:
>      local_action: lineinfile line={{ inventory_hostname }}': '{{ 
> vars['fdetails_' +  Layer].results|map(attribute='stdout')|list }} path={{ 
> playbook_dir }}/vars/filedets.yaml
>                                                                           
>              ^ 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:


Can you please suggest how can I inject the colons and space ': ' between 
the the variable in  line ?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7bb5a38d-a101-4250-9d3b-73740d188221%40googlegroups.com.

Reply via email to