Ansible安装巧克力失败

发布于 2025-01-30 13:35:34 字数 1155 浏览 6 评论 0原文

我想使用Ansible将Chocolatey安装到Windows 10 VM中。我使用CentOS8作为大师。我设法复制文件,从主仓库中安装.exe文件,但是当我使用以下剧本时,我会收到一个错误:

---
- name: "Chocolatey"
  hosts: win
  tasks:
    - name: Install chocolatey
      win_chocolatey:
          name:
           - chocolatey
           - chocolatey-core.extension
          state: present

错误

TASK [Install chocolatey] *******************************************************************
fatal: [myip.adress]: FAILED! => {"changed": false, "msg": "Failed to download Chocolatey                                           
script from 'https://chocolatey.org/install.ps1'; Exception calling \"DownloadString\" with                                           
\"1\" argument(s): \"The underlying connection was closed: Could not establish trust relation                                          
ship for the SSL/TLS secure channel.\"", "rc": 0}

也每次我连接到Windows 10 VM的任何Internet页面时像这样:

我该怎么办?

I want to use Ansible to install chocolatey into a Windows 10 VM. I use Centos8 as Master. I manage to copy files, install .exe files from master repo, but when I use the following playbook I got an error:

---
- name: "Chocolatey"
  hosts: win
  tasks:
    - name: Install chocolatey
      win_chocolatey:
          name:
           - chocolatey
           - chocolatey-core.extension
          state: present

ERROR

TASK [Install chocolatey] *******************************************************************
fatal: [myip.adress]: FAILED! => {"changed": false, "msg": "Failed to download Chocolatey                                           
script from 'https://chocolatey.org/install.ps1'; Exception calling \"DownloadString\" with                                           
\"1\" argument(s): \"The underlying connection was closed: Could not establish trust relation                                          
ship for the SSL/TLS secure channel.\"", "rc": 0}

Also every time I connect to any internet page from my windows 10 VM is looking like this:
enter image description here

What should I do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青春如此纠结 2025-02-06 13:35:34

请,看来此错误与存储库的Broked URL有关,请继续尝试以下来自Ansible文档:

 - name: Ensure Chocolatey itself is installed and use internal repo as source
  win_chocolatey:
    name: chocolatey
    source: http://someserver/chocolatey

Please, seems this error is related to broked URL from repository, please go ahead and try this one below from Ansible documentation:

 - name: Ensure Chocolatey itself is installed and use internal repo as source
  win_chocolatey:
    name: chocolatey
    source: http://someserver/chocolatey
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文