Hi All.
I currently pass a comma seperated list of variables to my ansible tower template in this matter
param1: xxxxx
server_port_list: “‘server1,4455’,‘server2,7777’,‘server3,5588’”
I have a file which has the contents below.
server1,4455
server2,7777
server3,5588
I have written the playbook in such a way that I now have access to the file.
I use the snippet below to read the file content.
- name: read file content
win_shell: type {{server_list}}
register: my_server_list
I need it passed to my script in this format, “‘server1,4455’,‘server2,7777’,‘server3,5588’”
How can i do this in ansible ?