I plan to add few hundred of lines in some files using Ansible. My idea is to put all those lines in a file and then use a variable inside the playbook.
This is the first part.
The second one is that those variables (in my case some URLs) will be just part from a static text. For example:
Playbook:
- name: Adding ACL
lineinfile:
path: /configs/haproxy.conf
insertafter: \#\ Define\ hosts
line: ' acl host_{{ URL }} hdr(host) -i {{ URL }}'
Any ideas how can I take the URL variable from another file, file that will contain hundred of entries??