On Mon, 7 Dec 2020 03:28:34 -0800 (PST)
Manoj Chander <
cmanoj....@gmail.com> wrote:
> ... a file with list of filenames
> ... read each line
> ... add a variable {{ version }} to the end
> ... pass it to another task
> ...
> cat file/branches.txt mhr- mtr- tsr
>
> ... each line add {{version}} to it
> mhr-1.1-SNAPSHOT mtr-1.1-SNAPSHOT tsr-1.1-SNAPSHOT
The task below does the job
- debug:
msg: "{{ lookup('file',
'files/branches.txt').split()|
product([version])|
map('join')|
join(' ') }}"
gives
msg: mhr-1.1-SNAPSHOT mtr-1.1-SNAPSHOT tsr-1.1-SNAPSHOT
--
Vladimir Botka