更新时间:2023-01-15 17:52:44
请注意,在提出此问题时,以下解决方案是可以接受的.更高版本的 Ansible 可能会提供更好的解决方案来解决这个问题.
正如您所说,所有查找都在本地主机上.但是所有这些都可以通过使用 shell
和 register
在远程完成.你能说出你到底想做什么吗?只是一个例子.
As you said, all lookups are on localhost. But all of them can be done on remote by using shell
and register
. Can you tell what exactly you are trying to do? just an example.
- shell: cat "{{remote_file}}"
register: data
- shell: ......
with_xxxx: