Ansible win_find命令未列出D驱动器中的文件-无法检查某些文件,这些文件已被忽略,并且不会成为结果输出的一部分

Ansible win_find命令未列出D驱动器中的文件-无法检查某些文件,这些文件已被忽略,并且不会成为结果输出的一部分,ansible,Ansible,我有下面的Ansible(2.9.6)任务来列出windows机器中的文件,一些机器是可以工作的。对于某些服务器,它会发出警告,不列出任何文件。解决这个问题有什么帮助吗 --- - name: getdir hosts: all gather_facts: false tasks: - name: Find direcotry win_find: paths: d:\ recurse: no get_checksum: n

我有下面的Ansible(2.9.6)任务来列出windows机器中的文件,一些机器是可以工作的。对于某些服务器,它会发出警告,不列出任何文件。解决这个问题有什么帮助吗

---
- name: getdir
  hosts: all
  gather_facts: false

  tasks:
  - name: Find direcotry
    win_find:
      paths: d:\
      recurse: no      
      get_checksum: no      
    register: result

  - name: Find direcotry
    debug:
      msg: "output {{ result }}"
样本输出:

TASK [Find direcotry] ************************************************************************************************************************************************************************
[WARNING]: win_find failed to check some files, these files were ignored and will not be part of the result output


ASK [Find direcotry] ************************************************************************************************************************************************************************
ok: [host01] => {
    "msg": "output {u'files': [], u'warnings': [u'win_find failed to check some files, these files were ignored and will not be part of the result output'], u'changed': False, 'failed': False, u'examined': 0, u'matched': 0}"
}

您确定运行它的用户有权访问该驱动器或文件夹吗?它是否存在于这些主机上?你能在详细模式下运行你的剧本并向我们提供结果吗<代码>ansible playbook-vvvv playbook.yaml是,帐户对该框具有管理员权限。已尝试
-vvvv
选项,但未提供更多详细信息。是否可以在启用完整调试器的情况下发布输出
$ANSIBLE\u DEBUG=true ANSIBLE\u VERBOSITY=4 ANSIBLE playbook playbook.yml
在Windows事件日志中可能还有一些细节。我还将在抛出错误的服务器上的D:\驱动器上创建一个简单的文本文件,以确保存在文件并且您可以读取这些文件。@WOWBAGER尝试了此步骤,它显示了它试图执行的power命令,但没有指向此错误消息的指针。我还可以在d:文件夹中创建文件,这意味着我使用的用户有权在d驱动器中写入文件。