I'm having a text file with lots of strings like below. Cat test.txt String1 String2 . . . Etc
I literally have 2k of strings on that file. I want to convert to yank like below. _ _ _ Listofstrings: - string1 - string2 ...etc I can achieve this via shell script but is there an ansible way of doing it using lineinfile or anything else? I know I can achieve via jinja2 tempalte as well but I don't know how to loop over the strings in the text file in j2 template. Kindly assist. -- 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/9800657f-5aa4-4b40-9c47-6d0184df079f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
