Sorry, the output is from stdout_lines.  here is the section.

- lineinfile:
    line: "{{ item }}"
    path: "{{ log }}"

   with_together:

     - "{{ memoryLocator.stdout_lines }}"

     - "{{ memoryPN.stdout_lines }}"

     - "{{ memorySN.stdout_lines }}"



The output to the log:
['DIMM1', 'G55555-111', '999000123'] 
['DIMM2', 'G55555-111', '999000440'] 
['DIMM3', 'G55555-111', '999000554'] 

I would like to just have:
DIMM1 G55555-111 999000123
DIMM2 G55555-111 999000440
DIMM3 G55555-111 999000554



On Thursday, February 28, 2019 at 11:10:23 AM UTC-8, Kai Stian Olstad wrote:
>
> On 28.02.2019 01:27, Ryan wrote: 
> > Thanks, that worked well.  I am writing this information to a file using 
> > lineinfile.  How would I strip off the brackets, quotes and commas? 
> > ['DIMM1', 'G55555-111', '999000123'] 
>
> I'm not sure what you do, but with_together don't produce a list, that 
> must be something you do so just don't do that. 
>
>
> -- 
> Kai Stian Olstad 
>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/43487801-df63-4534-adf0-98d925144201%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to