Skip to content

ldaneliukas/windows_disk_facts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

windows_disk_facts

Table of Contents

  1. Description
  2. Usage

Description

This module adds the following facts on Windows:

$::disks

The output of the Powershell Get-Disk command, but in a more Puppet-friendly format

$::drives

The output of the Powershell Get-PSDrive -PSProvider 'FileSystem' command, but in a more Puppet-friendly format + additional drive type information ('Fixed' = local hard drive, 'Removable' = removable devices like floppy and usb, 'CD-ROM' = optical drives)

$::partitions

The output of the Powershell Get-Partition command, but in a more Puppet-friendly format

Usage

# Loop over all of the partitions and find the one that is mounted to C:\
$::partitions.each |$partition| {
  if $partition['drive_letter'] == 'C' {
    # Do something here
  }
}

# Get the free size of C:\
notice($::drives['C']['free_bytes'])

Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%