我正在编写一个ansible剧本,以获取服务器的当前主机名,然后将其设置为一个配置文件。我想不出如何使用lineinfile模块来推动shell输出。- name: Get hostname register: result
- name: Set hostname on conf filelineinfile: dest=/etc/teste/linux/zabbix_agentd.conf reg
initialize2018-10-01 18:01:01: pid 22: LOG: setting the local watchdog node name to "172.31.0.9:5432 Linuxpgpool-II
2018-10-01 18:01:01: pid 23: LOG: setting the