Hi,
I'm trying to use puppet variables in exec command as follows
$pypredest = 'C:\PuppetSWT\Mysoftware.msi'
exec{ 'cmd /c copy /Y "\\shareloc\folder1\folder2\Mysoftware.msi" "${pypredest}"':
path => $::path,
creates => $pypredest,
logoutput => true,
}
Output from agent:
It says EXEC [ 'cmd /c copy /Y "\\shareloc\folder1\folder2\Mysoftware.msi" "${pypredest}"'] executed succesfully. But i don't the see the file copied to C:\PuppetSWT\ folder.
I get the file copied when i don't use variable.
$pypredest = 'C:\PuppetSWT\Mysoftware.msi'
exec{ 'cmd /c copy /Y "\\shareloc\folder1\folder2\Mysoftware.msi" "C:\PuppetSWT\Mysoftware.msi" ':
path => $::path,
creates => $pypredest,
logoutput => true,
}
-Thanks