Hello,

There's been quite a few cases recently of people wanting disk facts so I 
thought I'd try my hand at writing some.

I modeled it roughly on the IP facts, typical output looks like this:

# xen virtual machine
diskdrives => xvda
diskmodel_xvda => Xen Virtual Disk
disksize_xvda => 10485760
disktype_xvda => xvd

# SATA
diskdrives => sda,sdb
diskmodel_sda => SAMSUNG HD403LJ 
diskmodel_sdb => SAMSUNG HD403LJ 
disksize_sda => 781422768
disksize_sdb => 781422768
disktype_sda => scsi
disktype_sdb => scsi

# IDE (model is correct, that's what the kernel says)
diskdrives => hdc
diskmodel_hdc => (none)
disksize_hdc => 7928928
disktype_hdc => ide

At present it just understands linux and only SCSI, IDE and Xen VD on Linux.  I 
do not have access to other machines but would be keen to get help from people 
with at least one other platform or disk type (like openvz)

The code isn't particularly great, I could enhance it like the ip ones does 
with a map and utility classes, but I'll leave that for another nights hacking.

Any comments welcome, attached a zip file - don't have a git repo yet,

-- 
R.I.Pienaar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: diskdrives.tgz
Description: GNU Zip compressed data

Reply via email to