我正在写一本ansible剧本,用于在Windows 2016中使用网络共享作为winshotfix模块中的源代码在Windows 2016中安装修补程序。我为此写了下面提到的剧本。
我正在具有Red Hat Enterprise Linux Server 6.4版(圣地亚哥)的循环服务器中在python 3.5.2的虚拟环境中运行ansible Windows 10计算机上托管的VED中(使用腻子访问周期服务器),并且VED中配置了Windows7。我能够通过Windows文件资源管理器手动访问msu文件
'''
- name: install hotfix
win_hotfix:
hotfix_kb: KB4077525
source: \\SERVER-IP\hotfix\win2016\some msu file
state: present
become: yes
become_method: runas
become_flags: logon_type=new_credentials logon_flags=netcredentials_only
vars:
ansible_become_user: <username>
ansible_become_pass: <password>
'''
我希望输出为 '''
TASK [install hotfix]
**********************************************************
passed => {"changed": true,
''' 但实际输出是 '''
TASK [install hotfix]
**********************************************************
fatal: FAILED! => {"changed": false, "msg": "the path set for source
\\\\SERVER-IP\\hotfix\\win2016\\some file.msu does not exist or is not a
file", "reboot_required": false}
'''