Chef Repository for my OS X Lion/Lion Server Workstation Management
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.chef
bootstrap
cookbooks
roles
README.md
Rakefile
chefignore

README.md

Overview

These are the cookbooks I use to manage my local workstations, all running either OS X or OS X Server. Most of these cookbooks are not very complex, which is why I have chosen to condense them into one main cookbook called 'workstation.'

I also use separate logins on my workstations -- one for work and one for personal use. All of these recipes are designed around mutiple users on the same node. The user environments are identical for the most part, but I designed it this way to allow flexibility between the two users when I need it and to keep a completely separate environment.

Usage

If you take a look at the workstation_example.json file (in roles/) you will get an idea for how to declare the users you want this cookbook to manage. This cookbook does not create any user accounts on your machine or store the account passwords anywhere. The users must exist prior to declaring the attributes.

 "default_attributes": {
    "users": {
      "username1": {
        "git_name": "John Doe",
        "git_email": "jdoe@gmail.com",
        "ruby": {
          "global": "1.9.3-p194",
          "versions": [
            "1.9.3-p194",
            "1.9.2-p320"
          ]
        }
      },
      "username2": {
        "git_name": "John Doe",
        "git_email": "jdoe@gmail.com",
        "ruby": {
          "global": "1.9.3-p194",
          "versions": [
            "1.9.3-p194",
            "1.9.2-p320"
          ]
        }
      }
    }
  }

Bootstrapping

Bootstrapping using the provided bootstrap script will download and install the GCC package, compile a custom Ruby inside of /usr/local/opscode and then setup a root cron job to run chef-client every 30 minutes.

Example:

knife bootstrap 192.168.7.130 -d osx-lion -x ADMIN_USER_WITH_SUDO -P PASSWORD --sudo