Мне нужно поместить динамический c вывод в lineinfile в области строки - PullRequest
0 голосов
/ 13 февраля 2020

Образцы записей должны быть изменены:

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"

...