Образцы записей должны быть изменены:
lineinfile:
regexp: "^#?\\*.*?@@remote"
line: "*.info @@absd.com:601" # <- I need to change this base on my script output
dest: "/etc/rsyslog.conf"
Выходной образец:
lineinfile:
regexp: "^#?\\*.*?@@remote"
line: "*.info @@apple.com:601"
dest: "/etc/rsyslog.conf"
lineinfile:
regexp: "^#?\\*.*?@@remote"
line: "*.info @@orage.com:601"
dest: "/etc/rsyslog.conf"
lineinfile:
regexp: "^#?\\*.*?@@remote"
line: "*.info @@banana.com:601"
dest: "/etc/rsyslog.conf"