Skip to content

An experimental project for provisioning new development machines.

Notifications You must be signed in to change notification settings

seattle-beach/alfalfa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alfalfa

This is an experimental project for provisioning new development machines.

Alfalfa seeks a middle ground between sprout-wrap, which relies on Chef, and workstation-setup, which uses shell scripting.

Usage

Depending on how you feel about cows, you might find it useful to export ANSIBLE_NOCOWS=1 first.

Local Provisioning

bash <(curl -s https://raw.githubusercontent.com/seattle-beach/alfalfa/master/bootstrap.sh)
cd ~/workspace/alfalfa/ansible
ansible-playbook main.yml --ask-become-pass --connection=local

You will need to type yes a couple of times due to SSH known_hosts schenanigans until our playbook gets around to fixing it.

Notes

The base Alfalfa playbook (main.yml) balances having a base set of tools for a workstation with the amount of time required to run. As such, there are some other playbooks included with Alfalfa that can be installed to finish customizing a new install:

  • java.yml
  • ruby.yml
  • postgres.yml
  • xcode.yml
  • arkit.yml

Running a single playbook

To run an individual playbook, go into the ansible directory and run the ansible command like this:

pushd ~/workspace/alfalfa/ansible
ansible-playbook arkit.yml --ask-become-pass
popd

Sierra does not allow modifying TCC.db without jumping through significant hoops, so you'll need to manually enable apps that require accessibility access (e.g., ShiftIt).

Remote Provisioning

First, the remote machine needs to agree to the sudo disclaimer:

sudo -v && sudo -k

Then, on the control machine:

brew install ansible

git clone https://github.com/seattle-beach/alfalfa
cd alfalfa/ansible
echo HOST > hosts
ansible-playbook main.yml --ask-pass --ask-become-pass

Troubleshooting

fatal: [localhost]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host localhost port 22: Connection refused", "unreachable": true}

Append --connection=local to the playbook runner. So, instead of

ansible-playbook main.yml --ask-pass --ask-become-pass

use

ansible-playbook main.yml --ask-pass --ask-become-pass --connection=local

About

An experimental project for provisioning new development machines.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published