Ansible Version: 2.4.2.0
Ansible Control: Centos7
Target Hosts: Windows 2012R2
У меня есть файловый сервер с именем: FILESERVER
, и я поместил все chocolatey
пакеты в папку C:\Packages
. И эта папка является общей, поэтому другие серверы могут получить доступ к этой папке по пути UNC: \\FILESERVER\Packages
.
Если я войду на одну из машин и запущу:
choco install 7zip -y -s \\FILESERVER\Packages
он переходит к этому файловому серверу и устанавливает пакет. Однако, если я попробую это через Ansible
, он скажет, что пакет не существует в Choco Source.
---
- hosts: win
tasks:
- name: chocolatey-core.extension
win_chocolatey:
name: chocolatey-core.extension
state: present
source: \\FILESERVER\Packages
Ошибка:
fatal: [mdb]: FAILED! => {"changed": false, "choco_error_cmd": "choco.exe install -r --no-progress -y chocolatey-core.extension --timeout 2700 --failonunfound --source \\\\FILESERVER\\Packages", "choco_error_log": ["Installing the following packages:", "chocolatey-core.extension", "By installing you accept licenses for the packages.", "chocolatey-core.extension not installed. The package was not found with the source(s) listed.", " Source(s): '\\\\FILESERVER\\Packages'", " NOTE: When you specify explicit sources, it overrides default sources.", "If the package version is a prerelease and you didn't specify `--pre`,", " the package may not be found.", "Please see http s://chocolatey.org/docs/troubleshooting for more ", " assistance.", "","Chocolatey installed 0/1 packages. 1 packages failed.", " See the log for details (C:\\ProgramData\\chocolatey\\logs\\chocolatey.log).", "", "Failures", " - chocolatey-core.extension - chocolatey-coree.extension not installed. The package was not found with the source(s) listed.", " Source(s): '\\\\FILESERVER\\Packages'", " NOTE: When you specify explicit sources, it overrides default sources.", "If the package version is a prerelease and you didn't specify `--pre `,", " the package may not be found.", "Please see https://chocolatey.org/docs/troubleshooting for more ", " assistance."], "command": "choco.exe install -r --no-progress -y chocolatey-core.extension --timeout 2700 --failonunfound --source \\\\FILESERVER\\Packages", "msg": "Error installing package 'chocolatey-core.extension'", "rc": 1, "stdout": "Installing the following packages:\r\nchocolatey-core.extension\r\nBy installing you accept licenses for the packages.\r\nchocolatey-core.extension not installed. The package was not found with the source(s) listed.\r\n Source(s): \\\\FILESERVER\\Packages'\r\n NOTE: When you specify explicit sources, it overrides default sources.\r\nIf the package version is a prerelease and you didn't specify `--pre`,\r\n the package may not be found.\r\nPlease see https://chocolatey.org/docs/troubleshooting for more \r\n assistance.\r\n\r\nChocolatey installed 0/1 packages. 1 packages failed.\r\n See the log for details (C:\\ProgramData\\chocolatey\\logs\\chocolatey.log).\r\n\r\nFailures\r\n - chocolatey-core.extension - chocolatey-core.extension not installed. The package was not found with the source(s) listed.\r\n Source(s): '\\\\FILESERVER\\Packages'\r\n NOTE: When you specify explicit sources, it overrides default sources.\r\nIf the package version is a prerelease and you didn't specify `--pre`,\r\n the package may not be found.\r\nPlease see https://chocolatey.org/docs/troubleshooting for more \r\n assistance.\r\n", "stdout_lines": ["Installing the following packages:", "chocolatey-core.extension", "By installing you accept licenses for the packages.", "chocolatey-core.extension not installed. The package was not found with the source(s) listed.", " Source(s): '\\\\FILESERVER\\Packages'", " NOTE: When you specify explicit sources, it overrides default sources.", "If the package version is a prerelease and you didn't specify `--pre`,", " the package may not be found.", "Please see https://chocolatey.org/docs/troubleshooting for more ", " assistance.", "","Chocolatey installed 0/1 packages. 1 packages failed.", " See the log for details (C:\\ProgramData\\chocolatey\\logs\\chocolatey.log).", "", "Failures", " - chocolatey-core.extension - chocolatey-core.extension not installed. The package was not found with the source(s) listed.", " Source(s): '\\\\FILESERVER\\Packages'", " NOTE: When you specify explicit sources, it overrides default sources.", "If the package version is a prerelease and you didn't specify `--pre`,", " the package may not be found.", "Please see https://chocolatey.org/docs/troubleshooting for more ", " assistance."]}
Я не уверен, что сообщение об ошибке ansible сбивает с пути \\\\Fileserver\\Package
UNC? или он на самом деле использует этот \\\\FileServer\\Packages
как источник шоколада?