A Chef cookbook used to provision macOS
Перейти к файлу
Jacob Zaval 1492655a9d
Release macOS cookbook 1.2.0 (#36)
2018-01-28 14:23:38 -08:00
.delivery Refactor of Xcode to allow specification of iOS simulators (#1) 2017-10-10 12:42:07 -07:00
attributes Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) 2017-12-14 11:03:03 -08:00
data_bags/credentials Refactor of Xcode to allow specification of iOS simulators (#1) 2017-10-10 12:42:07 -07:00
documentation Release macOS cookbook 1.2.0 (#36) 2018-01-28 14:23:38 -08:00
libraries Release macOS cookbook 1.2.0 (#36) 2018-01-28 14:23:38 -08:00
recipes Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) 2017-12-14 11:03:03 -08:00
resources Release macOS cookbook 1.2.0 (#36) 2018-01-28 14:23:38 -08:00
spec Release macOS cookbook 1.2.0 (#36) 2018-01-28 14:23:38 -08:00
test/cookbooks/macos_test Release macOS cookbook 1.2.0 (#36) 2018-01-28 14:23:38 -08:00
.gitignore Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) 2017-12-14 11:03:03 -08:00
Berksfile Add generated cookbook content 2017-05-31 14:31:21 -07:00
LICENSE rename LICENSE for foodcritic 2017-09-27 16:32:45 -07:00
README.md Release macOS cookbook 1.2.0 (#36) 2018-01-28 14:23:38 -08:00
chefignore update chefignore 2017-09-09 21:25:35 -07:00
metadata.rb Release macOS cookbook 1.2.0 (#36) 2018-01-28 14:23:38 -08:00

README.md

macOS Cookbook

The macOS cookbook is a Chef library cookbook that provides resources for configuring and provisioning macOS. Additionally, it provides recipes that implement common use-cases of the macOS cookbook's resources.

macOS High Sierra 10.13 build-status-1013
macOS Sierra 10.12 build-status-1012

Requirements

  • Only tested on Chef 13
  • Surprisingly, this cookbook is only compatible with macOS

Supported OS Versions

  • OS X El Capitan 10.11
  • macOS Sierra 10.12
  • macOS High Sierra 10.13

Attributes

Admin User and Password

node['macos']['admin_user'] = 'vagrant'
node['macos']['admin_password'] = 'vagrant'

Each of these attributes defaults to vagrant since our resources are developed with the Vagrant paradigm. In other words, the user and password declared here should be an admin user with passwordless super-user rights.

Recipes

Disable Software Updates

Disables automatic checking and downloading of software updates.

Usage: include_recipe macos::disable_software_updates

No attributes used in this recipe.

Keep Awake

Prevent macOS from falling asleep, disable the screensaver, and several other settings to always keep macOS on. Uses the plistbuddy and pmset resources.

Usage: include_recipe macos::keep_awake

Attribute used Default value
node['macos']['network_time_server'] 'time.windows.com'
node['macos']['time_zone'] 'America/Los_Angeles'

Mono

Installs Mono. Requires package name, version number, and checksum in order to override.

Usage: include_recipe macos::mono

Attribute used Default value
node['macos']['mono']['package'] 'MonoFramework-MDK-4.4.2.11.macos10.xamarin.universal.pkg'
node['macos']['mono']['version'] '4.4.2'
node['macos']['mono']['checksum'] 'd8bfbee7ae4d0d1facaf0ddfb70c0de4b1a3d94bb1b4c38e8fa4884539f54e23'

Xcode

Installs Xcode 9.1 and simulators for iOS 10 and iOS 11. Check out the documentation for the Xcode resource if you need more flexibility.

🔶 Requires an apple_id data bag item.

Usage: include_recipe macos::xcode

Attribute Used Default value
node['macos']['xcode']['version'] '9.1'
node['macos']['xcode']['simulator']['major_version'] %w(11 10)

Apple Configurator 2

Installs Apple Configurator 2 using mas and links cfgutil to /usr/local/bin.

🔶 Requires an apple_id data bag item.

Usage: include_recipe macos::configurator

Attributes: No attributes used in this recipe.

Data Bags

Both the macos::xcode and macos::configurator recipes require a data bag item named apple_id containing valid Apple ID credentials. For example:

Example:

{
  "id": "apple_id",
  "apple_id": "farva@spurbury.gov",
  "password": "0k@yN0cR34m"
}

Resources