Coder Social home page Coder Social logo

osx-ansible's Introduction

Ansible playbook for OSX

Introduction

OSX Playbook assembled from various Ansible Galaxy and GitHub repos. Credits to those who share.

The main focus of this setup is on software development (duh). See the install.yml for the complete list of packages, and the configuration.yml for what happens with shells and dotfiles.

This playbook does not overwrite dotfiles

I decided not to overwrite dotfiles, but instead use those that are found. This goes against immutability of the deployment, but we're dealing with an OSX workstation here, and I don't want you to rename files back and forth. To see what comes out of the box, you have to backup and remove the following files and folders before running the playbook:

  • ~/.common*
  • ~/.vim*
  • ~/.zsh*

If will attempt to create the following files and symlinks:

  • ~/.common-env
  • ~/.common-aliases
  • ~/.vim*
  • ~/.oh-my-zsh
  • ~/.zsh*

The common files will be shared between bash and zsh.

Prerequisites

Sudo

Before you start, make sure you have password-less sudo:

sudo visudo

If you are asked for a password then you don't have sudo, so go ahead and uncomment the line granting passwordless sudo to the group 'wheel'.

Then add yourself to the 'wheel' group:

sudo dseditgroup -o edit -a usernametoadd -t user wheel

And if you want to be an admin if you weren't yet (I don't believe this is necessary, but I might be wrong. Hey, I'm admin!):

sudo dseditgroup -o edit -a usernametoadd -t user admin

Cask app path

To not have brew cask install all apps in ~/Applications, but in /Applications (like the rest of your apps), and to avoid double installs, we need to tell cask about this. So until this pull request is merged, place this line somewhere in your ~/.bash_profile: export HOMEBREW_CASK_OPTS="--appdir=/Applications" and make sure you source it (. ~/.bash_profile) before running the playbook.

Xcode

Be sure to have the XCode Command-Line tools installed: xcode-select --install

Install

You are now set to go ahead:

  1. Manually install Ansible 1.8 with git clone https://github.com/ansible/ansible.git ~/src/github.com/ansible/ansible; cd ~/src/github.com/ansible/ansible; git submodule update --init --recursive; sudo make install
  2. While that's happening Fork this repo and then clone your fork anywhere you want on your machine: git clone https://github.com:<yourname>/osx-ansible.git osxc; cd osx-ansible
  3. Take a quick look at configuration.yml and installation.yml customizing to your liking.
  4. Start the playbook with ansible-galaxy install -r requirements.yml && ansible-playbook desktop.yml

Credits

  • rricard, who started this fork and published osxc.* tools to install brew and cask packages.
  • spencergibb, for his mac_pkg module to enable manual downloading of dmg and pkg files.
  • hnakamur, for his atom_packages module.
  • robbyrussell, for oh-my-zsh
  • square, for maximum-awesome dotfiles.

Learn More

Ansible documentation

If you want to get more documentation or just want to see what osxc can do for you, here's a repository list on ansible galaxy where you can find all the publicly available roles for osxc.

osx-ansible's People

Contributors

rricard avatar morriz avatar ninjabong avatar lukeorland avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.