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.