Version information
This version is compatible with:
- Puppet Enterprise >=3.8.3 <4.0.0
- Puppet >=3.8.3 <4.0.0
Start using this module
Add this module to your Puppetfile:
mod 'sfu-managedmac', '0.7.3'
Learn more about managing modules with a PuppetfileDocumentation
managedmac
Copyright 2015, Simon Fraser University.
Overview
A comprehensive collection of Puppet classes and types for managing OS X.
Puppet Version 4.x is not currently supported
Description
This is a giant Puppet module. It abstracts all the things. It won't win any awards for being small and portable and pretty, because it does A LOT OF STUFF.
Some of this stuff is very useful, a lot of it is new, all of it is IN ONE PLACE.
- Mobileconfig Type for managing OS X profiles
- Propertylist Type for managing OS X plist and preferences
- Macauthdb Type for managing OS X Authorization DB
- Macgroup Type for managing groups-in-groups
- Manages Login/Logout Hooks globally
- Manages ARD/ScreenSharing service and related ACLs
- Manages Bluetooth/Airport power
- Manages FileVault configuration
- Raw Constructor classes for users, groups, etc.
- Lots more...
Requirements
- OS X 10.9 or greater
- Puppet 3.x (No Puppet Version 4 support at this time)
- puppetlabs-stdlib module
- CFPropertyList gem
- sqlite3 gem
How does it work?
This module was designed to be a world-engine for OS X.
You fuel it with Hiera data.
By itself, it does nothing, but...
Once, you've installed the components and created a configuration file, you have everything you need to begin terraforming.
Example:
--
managedmac::organization: My Organization # identify yourself
managedmac::ntp::enable: true # turn on the ntp client
managedmac::ntp::servers: # use a list of ntp servers
- time.apple.com
- time1.google.com
managedmac::filevault::enable: true # turn on FDE
managedmac::filevault::use_recovery_key: true # use a recovery key
managedmac::filevault::show_recovery_key: true # show the user the key
managedmac::mobileconfigs::payloads: # manage the dock, but why?
'managedmac.dock.alacarte':
content:
largesize: 128
orientation: left
tilesize: 128
autohide: true
PayloadType: 'com.apple.dock'
displayname: 'Managed Mac: Dock Settings'
For more information about the zillions of options available, see files/sample.yaml.
What can I do with this thing?
Good question. Here are 1700 lines of heavily commented YAML you can peruse to get an idea!
It should give you good overview of what the module can do.
Classes
There are a number of classes included in this module; each one groups a specific set of configuration options.
Documentation on classes is available on the Github project page.
Custom Types
There are a few custom types used in this module. Naturally, once you have installed the module, these types will be available to use in your own Puppet code if you don't fancy using any of the builtin classes.
Documentation on custom types and providers is available on the Github project page.
More Documentation
For more docs, tutorials, and how-tos, see the project page on Github.
Types in this module release
Change Log
0.7.3
- IMPORTANT: requires Puppet 3.8.3
- Plenty of bug fixes and make ready the El Capitan
- Refactoring and optimization of some Puppet functions
- Improves AppStore preference controls
- Update specs to run RSpec 3
- Thanks to helge000 for fixing issue #90
- closed: #82, #86, #90, #92, #93
0.7.2
- no changes; just need to bump the version so I can submit to the Forge
0.7.1
- properly scope the module to Puppet Version 3 only
- reference issues: #80, #81 and #84
0.7.0
- closed: #81, #79, #76, #75, #72, #69
- Dsconfigad is now the default provider for the
managedmac::activedirectory
class - fixes a bug in Macgroup type that was purging members when
strict
wasfalse
- updates docs and comments
0.6.0
- closed: #56, #63, #64, #66, #67, #68, #71, #73
- new type: Dsconfigad
- new feature: managedmac::activedirectory class has new provider option
- enhancement: manage mobileconfigs that contain embedded certs
- new feature: control the Desktop picture (clburlison)
- several bug fixes and improvements (much credit: clburlison) thanks!
0.5.9
- bug fixes for: #3, #54, #58, #59, 60
- fix #59 and #60 are important; you should update
- gem maintenance
- rake task overhauls
- fix failing spec
0.5.8
- quick bug fixes for #55 and #57
- fix filevault_active fact
- fix init.pp
0.5.7
- add fact: macaddress_primary
- add raw constructor: cron
- make ntp class idemtpotent
- fix documentation
- bug fixes: #47, #48, #50, #51
0.5.6
- overhauled macauthdb provider; still needs a bit of work, but is operating as designed
- allow scoped PHD policy by expanding $enable param to accept version strings
- fix an edge case with ssh service management
- documentation fixes
- bug fixes for issues #37, #38, #41, and #42
0.5.5
- release 0.5.5
0.5.4
- bug fixes for issues #34, #33, #32, #8, #36
0.5.3
- release 0.5.3
- bug fixes for issues #25, #26, #27, #30
- added small utility to convert a profile into Hiera data
0.5.1
- release 0.5.1
- update metadata.json and build
- fix issue #24
0.5.0
- release 0.5.0
- update metadata.json and build
0.4.9
- fix issue #23
- implements com.apple.SoftwareUpdate control AllowPreReleaseInstallation
0.4.8
- fixes for issues #21, #19, and 18
- mainly adjusting for changes in Yosemite
0.4.7
- fixes issue #20
- Mobileconfig can now handle any kind of profile (in theory)
- mcx.pp now places custom MCX into a profile; no more local MCX
- fix some edges in the #destringify method
0.4.6
- bug fixes: #16 and #17
0.4.5
- release 0.4.5
- update metadata.json and build
0.4.4
- more authorization fixes and enhancements (see log)
- fix issue #11, Mobileconfig#content was failing to process an empty array
- fix issue #6, changed variable name
0.4.3
- fix issue #11: merge pull-request from @groob
- fix documentation and add tests
- lock down gem versions
0.4.2
- fix issues #10 and #13
- many changes to Mobileconfig, see log for details
0.4.1
- fix issues #4 and #5
- some clean-up
0.4.0
- initial release
0.3.3
- clean-up and organize some documentation in preparation for Github
0.3.2
- add documentation to init; make organization configurable
- correct macgroup resource creation and gid checking
0.3.1
- update the propertylist resources so that they use the new provider
0.3.0
- re-org propertylist type/provider to make room for new provider, :defaults
- :defaults handles preference synching in addition to plist management
0.2.9
- many many bug fixes and enhancements, see the log...
- fix issue with macgroup type/provider in which resources would be re-applied on each run if the :strict param was :false
0.2.8
- add a sample hiera config detailing the many params for each class
- spec gem requirements and add sqlite3 gem resource
0.2.7
- macgroup provider bug fix
0.2.6
- refactor classes and re-spec to make them compatible with our plan to contain all classes
- refactor hooks to make them init.pp compatible
- re-spec init.pp with class containment tests
- make energysaver compatible with our plan to contain ALL classes in init.pp
0.2.5
- add and refactor some of the raw constructor classes
0.2.4
- refactor many classes to use a generic function; rename some others
0.2.3
- refactor security class with genericized function for processing params
0.2.2
- lots of refactoring to existing classes, bug fixes and additional features
0.2.1
- simply rename the class to better identify it's purpose
0.2.0
- significant enhancments to the softwareupdate class
0.1.9
- complete overhaul of the loginwindow class with added features, including an ACL
0.1.8
- refactored the active directory class making all class params explcit
0.1.7
- remove the ntp_offset fact and adjust the ntp class accordingly
0.1.6
- add service management for sshd and screensharing
0.1.5
- implements a new param for the mcx class that will suppress the iCloud setup dialogue for new users
0.1.4
- add class mounts and mcx
- mounts handles the mapping of drives at login
- mcx class handles bluetooth, wifi, and miscellaneuous loginitems
0.1.3
- adds propertylist type/provider and a raw constructor class for these types of files
0.1.2
- add remotemanagement type/provider for Apple Remote Desktop
0.1.1
- add class for managing basic security options
0.1.0
- adds filevault configurability; needs more testing
0.0.9
- add new class for managing portable home directory configurations
0.0.8
- add class fro managing sys pref panes
0.0.8
- new custom type and provider for managignn the OS X authorization db
- the Puppet builtin type macauthorization is broken in Mavericks
0.0.7
- added defined type: hook
- implemented classes loginhook and logouthook
0.0.6
- add the first ACL com.apple.access_loginwindow
- more to follow, but time to forge ahead as these are easy to add
- fix ntp_spec; class worked but the spec was brokenp
- not sure how they got out of whack
- bug fixes for macgroup and related method in common.rb
- add a new defined type for working with OS X groups ACLs
- abstracts Macgroup
- add a raw constructor class that builds Macgroup resources from data bindings
- work was begun on a previous brnach but using the built-in Puppet type
- add new custom type/provider for working with OS X Group resources: Macgroup
- Macgroup is a replacement for the built-in Puppet Group type but can handle nestedgroups
0.0.5
- Adds support for dynamically creating Mobileconfig resources using params
0.0.5
- Add users class that llows user reources to be created from param data
0.0.4
- refactor the softwareupdate class to accept a new parameter as per loginwindow
- Add loginwindow class fro controlling com.apple.loginwindow prefs domain
- includes multi-params for overriding $options; we'll be refactoring other classes to use this approach
- Add a primitive class for managing Energy Saver settings via mobileconfig resource
- add class for managing softwareupdate CatalogURL
- Like the activedirectory class, make the ntp class handle an ensure option and act accordingly.
- Also contains a commit that makes the ntp class a conditional requirement for the activedirectory class
0.0.3
- Many changes, all in an effort to normalize content and sanitize equality testing on the content parameter. The issues look like they are resolved, but there may be edge cases.
- We now scrub the content array in the Type so that it is normalized when we get around to comparing it with existing values. Likewise, existing values are also scrubbed before the resource is constructed.
- There are also a few bug fixes and additional changes to the activedirectory provider that should simplify content construction and resource management.
- make the content parameter more extensible
- ensure resource checking can accomodate unmanaged keys
- overhaul mobileconfig type and supply two providers: default and activedirectory
- refactor some other things
0.0.2
- refactor, comment, clean-up and rename the mobileconfig type/provider
- subclass mobileconfig
0.0.1
- initial commit
Dependencies
- puppetlabs/stdlib (>= 4.1.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and 2. You must cause any modified files to carry prominent notices stating that You changed the files; and 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2013 Gareth Rushgrove Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.