Ansible aclling two diffrent file variables into single task looping through multiple files
问题 Content of fil1 # cat file1 fostrain01.example.com fostrain02.example.com fostrain03.example.com Content of file2 # cat fil2 ServerIPS 171.20.20.16 171.20.20.17 171.20.20.18 171.20.20.19 171.20.20.20 ServerIPS 171.20.20.21 171.20.20.22 171.20.20.23 171.20.20.24 171.20.20.25 In the below playbook, its replacing the contents on two lines one is hostname as str and in another line replacing the ip So, i have taken the two different task 1) Replace strings in file & 2) Replace ip in file to