我不断收到错误'找不到命令'C:\ puppetfolder \ unzip.exe'或'找不到命令'C:\ puppetfolder \ 7-Zip.exe',无论我尝试哪个......基本上我正在尝试解压缩将压缩文件 (server.zip) 放入目录 C:\puppetfolder。Puppet 能够将 7z1507.exe 和 unzip.exe 下载到 C:\puppetfolder\ 目录中,因此可执行文件是它们的。但是我应该在命令属性中使用提取、解压缩、解压缩或 7zip 来让这个 server.zip 文件解压缩到同一目录中吗?或者我的论点对于这个用例是错误的?
-> 文件 { 'C:\puppetfolder\7z1507.exe':
ensure => 'present',
provider => 'windows',
mode => '0775',
owner => 'Administrator',
group => 'Administrator',
}
-> 文件 { 'C:\puppetfolder\unzip.exe':
ensure => 'present',
mode => '0775',
owner => 'Administrator',
group => 'Administrator',
}
->
文件 {'C:\puppetfolder\server.zip':
ensure => 'file',
source => 'puppet:///modules/downloadscript/server.zip',
checksum => 'mtime',
mode => '0775',
owner => 'Administrator',
group => 'Administrator',
}
-> 执行 {'unzip_c:\puppetfolder\server.zip':
path => 'c:\\puppetfolder\\unzip.exe',
command => "C:\\puppetfolder\\unzip.exe /c C:\\puppetfolder\\server.zip C:\\puppetfolder -y",
provider => 'windows',
}
-> 执行 {'install_c:\puppetfolder\downloadtest.ps1':
command => 'C:\\puppetfolder\\downloadtest.bat',
logoutput => 'true',
provider => 'windows',
} }