什么是错误 "Get-AnsibleWindowsWebRequestSpec"?
What is error "Get-AnsibleWindowsWebRequestSpec"?
我正在尝试通过 Ansible 使用 ansible.windows.win_get_url
模块将 .txt 文件从 FTP 服务器上传到 Windows 客户端,如下所示:
剧本:
hosts: win
gather_facts: no
tasks:
- name: Download file through FTP
ansible.windows.win_get_url:
url: ftp://10.30.103.3/FLAG.txt
dest: '%TEMP%/FLAG.txt'
url_username: test
url_password: azerty
在输出中,最后尝试时:
ansible-playbook test_ftp.yml > error.txt
我收到错误:
"msg": "Unhandled exception while executing module: The term 'Get-AnsibleWindowsWebRequestSpec' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
我使用
安装了模块
ansible-galaxy collection install ansible.windows
我正在使用 Ansible 2.9。
错误是剧本中的Windows任务,由ansible.windows.win_get_url
改为win_get_url
谢谢大家的回答。
你能post你的评论作为答案吗?
我正在尝试通过 Ansible 使用 ansible.windows.win_get_url
模块将 .txt 文件从 FTP 服务器上传到 Windows 客户端,如下所示:
剧本:
hosts: win
gather_facts: no
tasks:
- name: Download file through FTP
ansible.windows.win_get_url:
url: ftp://10.30.103.3/FLAG.txt
dest: '%TEMP%/FLAG.txt'
url_username: test
url_password: azerty
在输出中,最后尝试时:
ansible-playbook test_ftp.yml > error.txt
我收到错误:
"msg": "Unhandled exception while executing module: The term 'Get-AnsibleWindowsWebRequestSpec' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
我使用
安装了模块ansible-galaxy collection install ansible.windows
我正在使用 Ansible 2.9。
错误是剧本中的Windows任务,由ansible.windows.win_get_url
改为win_get_url
谢谢大家的回答。
你能post你的评论作为答案吗?