我有 puppet 清单,可以下载 exe 文件并安装在 windows server 中。运行命令时出现错误:puppet agent -t on windows server。
清单文件:/etc/puppet/modules/mercury/manifests/iisserver.pp
class mercury::iisserver {
download_file { "Download dotnet core 2":
url => 'http://download.microsoft.com/download/7/3/A/73A3E4DC-F019-47D1-9951-0453676E059B/dotnet-sdk-2.0.2-win-gs-x64.exe',
destination_directory => 'C:/dotnet-sdk-2.0.2-win-gs-x64.ex',
notify => Package["dotnercore2"],
}
package { "dotnercore2":
ensure => installed,
source => "C:/dotnet-sdk-2.0.2-win-gs-x64.exe",
require => File["C:/dotnet-sdk-2.0.2-win-gs-x64.exe"],
}
}
运行 Puppet 代理 -t 后 Windows 服务器上的错误:
错误:无法从远程服务器检索目录:服务器上的错误 400:“Stdlib::HTTPUrl”处的语法错误;节点 XXXX 上 /etc/puppet/modules/download_file/manifests/init.pp 中的预期')'
警告:不在失败的目录上使用缓存。错误:无法检索目录;跳过运行