Skip to content

Commit

Permalink
Code cleanup + add missing configs
Browse files Browse the repository at this point in the history
  • Loading branch information
mgibeau committed Oct 1, 2018
1 parent 48e268f commit b7d8b28
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 11 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ This will run a series of tasks on the local machine to setup a development envi
1. Apple's command line tools (`xcode-select --install`).
2. [Install Ansible](http://docs.ansible.com/intro_installation.html).

## Usage
## Installing

### Install script

```
curl -o- https://raw.githubusercontent.com/mgibeau/mac-dev-playbook/master/install.sh | bash -x
```

### Manual install

```shell
$ ansible-galaxy install -r requirements.yml
Expand Down
7 changes: 7 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ workspace_dir: ~/workspace
homebrew_installed_packages:
- awscli
- certbot
- dep
- direnv
- dockutil
- git
Expand All @@ -15,9 +16,11 @@ homebrew_installed_packages:
- nmap
- node
- pipenv
- pinentry-mac
- python
- redis
- terraform
- travis
- wget
- wrk

Expand Down Expand Up @@ -77,6 +80,9 @@ dockitems_to_remove:
- iBooks
- App Store
- System Preferences
- Pages
- Numbers
- Keynote

dockitems_to_persist:
- name: iTerm
Expand Down Expand Up @@ -115,6 +121,7 @@ vscode_extensions:
- mikestead.dotenv
- ms-python.python
- ms-vscode.atom-keybindings
- ms-vscode.Go
- PeterJausovec.vscode-docker
- vscoss.vscode-ansible
- waderyan.gitblame
11 changes: 8 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
#!/usr/bin/env bash

INSTALLER_ROOT="$HOME/.mac-dev/"
ANSIBLE_DIR="$INSTALLER_ROOT/mac-dev-playbook"

set -e;
mkdir -p "$HOME/.mac-dev/"
cd "$HOME/.mac-dev/"
mkdir -p "$INSTALLER_ROOT"
cd "$INSTALLER_ROOT"

# Install requirements
sudo easy_install pip
sudo pip install ansible

# Grab latest playbook and unzip
curl -LO https://github.com/mgibeau/mac-dev-playbook/archive/master.zip
rm -rf "$ANSIBLE_DIR"
unzip master.zip
cd mac-dev-playbook
rm master.zip
cd "$ANSIBLE_DIR"

# Install deps + run
ansible-galaxy install -r requirements.yml
Expand Down
12 changes: 6 additions & 6 deletions main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
tags: ['mas']

tasks:
- include_tasks: tasks/dockitems.yml
- import_tasks: tasks/dockitems.yml
tags: ['macos']

- include_tasks: tasks/macos.yml
- import_tasks: tasks/macos.yml
tags: ['macos']

- include_tasks: tasks/workspace.yml
- import_tasks: tasks/workspace.yml
tags: ['dev']

- include_tasks: tasks/iterm.yml
- import_tasks: tasks/iterm.yml
tags: ['dev']

- include_tasks: tasks/vscode.yml
- import_tasks: tasks/vscode.yml
tags: ['dev']

- include_tasks: tasks/git-repos.yml
- import_tasks: tasks/git-repos.yml
tags: ['dev']
7 changes: 6 additions & 1 deletion tasks/iterm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
checksum: sha256:3602d6478952d9462c1d9e3060464c0f3458972212c0d3fc4205d7a364b3e77a
validate_certs: false

- name: Ensure `DynamicProfiles` directory exists
file:
path: "~/Library/Application Support/iTerm2/DynamicProfiles/"
state: directory

- name: Copy profile to iTerm
template:
src: ../files/iterm/profiles.json.j2
dest: ~/Library/Application Support/iTerm2/DynamicProfiles/profiles.json
dest: "~/Library/Application Support/iTerm2/DynamicProfiles/profiles.json"
5 changes: 5 additions & 0 deletions tasks/vscode.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
- name: Ensure `/Code/User/` directory exists
file:
path: "~/Library/Application Support/Code/User/"
state: directory

- name: Copy user settings
copy:
src: ../files/vscode/settings.json
Expand Down

0 comments on commit b7d8b28

Please sign in to comment.