ansible查找管道是否插入主机名?

ansible查找管道是否插入主机名?,ansible,Ansible,在ansible中,我使用以下命令将日期插入ansible创建的文件中: log_path: c:\ansible_wu{{ lookup('pipe', 'date +%Y%m%d') }}.txt 有没有办法在日期前插入的主机名? 所以文件看起来是这样的:servername\u wu20180518.txt您应该能够使用值{{ansible\u hostname}。您应该能够使用值{{ansible\u hostname}

在ansible中,我使用以下命令将日期插入ansible创建的文件中:

log_path: c:\ansible_wu{{ lookup('pipe', 'date +%Y%m%d') }}.txt
有没有办法在日期前插入的主机名?
所以文件看起来是这样的:
servername\u wu20180518.txt
您应该能够使用值{{ansible\u hostname}。

您应该能够使用值{{ansible\u hostname}