Forge Home

mac_facts

A collection of Facts to aid with the administration of OS X machines

12,104 downloads

10,894 latest version

3.9 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.4.0 (latest)
  • 0.3.0
  • 0.2.0
  • 0.0.2
  • 0.0.1
released Oct 8th 2013

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'grahamgilbert-mac_facts', '0.4.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add grahamgilbert-mac_facts
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install grahamgilbert-mac_facts --version 0.4.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: mac, osx, darwin

Documentation

grahamgilbert/mac_facts — version 0.4.0 Oct 8th 2013

mac_facts

##Overview

This a collection of Facts specific to managing OS X clients with Puppet.

###mac_battery_charge_percent

The current battery charge, in percent

###mac_battery_charging

Whether the battery is currently charging or not

###mac_battery_cycles

The number of cycles the battery has been through

###mac_battery_health

Whether the battery has failed or not

###mac_current_user

This fact displays the current user logged into the console.

###mac_encryption_enabled

Returns true if FileVault 2 is enabled (only compatible with Mac OS X 10.8 and higher).

###mac_flash_version

Returns the value of the version of Adobe Flash that's installed

###mac_java_vendor

Returns Oracle or Apple, depending on the vendor of the installed Java

###mac_java_version

Returns the version of Java

###mac_laptop

If the machine is a laptop, it will return mac_laptop otherwise it will be a mac_desktop (until we get iPads running full OS X...)

###mac_memory_in_gb

Returns a simple value of the amount of memory the Mac has in GB - useful for doing greater or less than searches in the Inventory Service.

###mac_timezone

Returns the current timezone in a format that systemsetup can use.