Hello, all.

I'm trying to create a manifest that will 1) create a file populated with 
wmic-generated data, and; 2) rename that file to include the server name. 
 Here's what I've written:


class win_diskinfo {
exec { 'create disk info file' :
        command => 'c:\windows\system32\cmd.exe /C "wmic logicaldisk get 
name,volumename" > c:\temp\disks.txt',
     }
exec { 'rename disk info file' :
        command => 'c:\windows\system32\cmd.exe /C ren c:\temp\disks.txt 
disks-%computername%.txt',
     }
}


The first exec runs fine, abd "disks.txt" is created.  However, the second 
exec fails, with the message that an exit code of 1 was returned, rather 
than 0.  If I run "c:\windows\system32\cmd.exe /C ren c:\temp\disks.txt 
disks-%computername%.txt" from Windows dos box, I get the expected results. 
 Can anyone help me fix this?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7a218e79-10d9-4516-a828-ca0966f0c2fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to