Forge Home

mac_facts

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

12,587 downloads

11,133 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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

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.