I keep getting the error 'Could not find command 'C:\puppetfolder\unzip.exe' or 'Could not find command 'C:\puppetfolder\ 7-Zip.exe' whichever one I try… basically I’m trying to unzip a zipped file (server.zip) into the directory C:\puppetfolder. Puppet is able to dowmload 7z1507.exe and unzip.exe in the C:\puppetfolder\ directory so the executales are their. But should I be using extract, unpack, unzip or 7zip in the command attribute to get this server.zip file to unzip into the same directory? Or is my argument wrong for this use case?
-> file { 'C:\puppetfolder\7z1507.exe':
ensure => 'present',
provider => 'windows',
mode => '0775',
owner => 'Administrator',
group => 'Administrator',
}
-> file { 'C:\puppetfolder\unzip.exe':
ensure => 'present',
mode => '0775',
owner => 'Administrator',
group => 'Administrator',
}
->
file { 'C:\puppetfolder\server.zip':
ensure => 'file',
source => 'puppet:///modules/downloadscript/server.zip',
checksum => 'mtime',
mode => '0775',
owner => 'Administrator',
group => 'Administrator',
}
-> exec {'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',
}
-> exec { 'install_c:\puppetfolder\downloadtest.ps1':
command => 'C:\\puppetfolder\\downloadtest.bat',
logoutput => 'true',
provider => 'windows',
} }