Chef cookbook to login to Mac OS X GUI
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
libraries
providers
resources
spec
test/fixtures/cookbooks/macosx_gui_login_test
.chefignore
.gitignore
.kitchen.localhost.yml
.kitchen.yml
.rubocop.yml
.travis.yml
Berksfile
CHANGELOG.md
CONTRIBUTING.md
Gemfile
LICENSE.md
README.md
Rakefile
metadata.rb

README.md

Mac OS X GUI Login Cookbook

Cookbook Version Build Status

This cookbook logs into Mac OS X GUI via AppleScript.

Requirements

  • Chef 12 or higher (you can use Chef 11, but sensitive attribute won't work)

Platforms

  • Mac OS X - Mountain Lion (10.8) or higher

Usage

Include cookbook as a dependency before calling macosx_gui_login resource.

Actions

  • run - Logs into GUI.

Attributes

  • username (required) - Username to login as. Defaults to the name of the resource block.
  • password (required) - Password of user.
  • sensitive - Suppress logging stdout and stderr to Chef-client. Default: true.

Examples

Login as vagrant user:

macosx_gui_login 'login to vagrant user' do
  username 'vagrant'
  password 'vagrant'
  sensitive true
  action :run
end

ChefSpec Matchers

This cookbook includes custom ChefSpec matchers you can use to test your own cookbooks.

Example Matcher Usage

expect(chef_run).to run_macosx_gui_login('login to vagrant user').with(
  username: 'vagrant',
  password: 'vagrant',
  sensitive: true
)

Cookbook Matchers

  • run_macosx_gui_login(resource_name)

Getting Help

Contributing

Please refer to CONTRIBUTING.

License

MIT - see the accompanying LICENSE file for details.