windows_disk_facts

Disk related facts for Windows

Dylan Ratcliffe

dylanratcliffe

24,567 downloads

7,861 latest version

5.0 quality score

Version information

  • 0.2.5 (latest)
  • 0.2.4
  • 0.2.3
  • 0.2.1
  • 0.2.0
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Jun 8th 2018
This version is compatible with:
  • Puppet Enterprise >= 3.3.0
  • Puppet >= 3.3.0
  • Windows

Start using this module

Documentation

dylanratcliffe/windows_disk_facts — version 0.2.5 Jun 8th 2018

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