You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<imgsrc="https://raw.githubusercontent.com/geerlingguy/mac-dev-playbook/master/files/Mac-Dev-Playbook-Logo.png"width="250"height="156"alt="Mac Dev Playbook Logo" />
2
-
3
1
# Mac Development Ansible Playbook
4
2
3
+

4
+
5
5
[![CI][badge-gh-actions]][link-gh-actions]
6
6
7
+
This work is inspired by [geerlingguy](https://github.com/geerlingguy/mac-dev-playbook)'s work on automating the setup for my MacBook.
8
+
7
9
This playbook installs and configures most of the software I use on my Mac for web and software development. Some things in macOS are slightly difficult to automate, so I still have some manual installation steps, but at least it's all documented here.
8
10
9
11
This is a work in progress, and is mostly a means for me to document my current Mac's setup. I'll be evolving this playbook over time.
4. Run `$ ansible-galaxy install -r requirements.yml` inside this directory to install required Ansible roles.
24
-
5. Run `ansible-playbook main.yml -i inventory --ask-become-pass` inside this directory. Enter your account password when prompted.
24
+
1. Clone this repository to your local drive.
25
+
2. Source [`bootstrap.sh`](bootstrap.sh)
26
+
3. Run `$ mac::setup`
25
27
26
28
> Note: If some Homebrew commands fail, you might need to agree to Xcode's license or fix some other Brew issue. Run `brew doctor` to see if this is the case.
27
29
28
30
### Use with a remote Mac
29
31
30
32
You can use this playbook to manage other Macs as well; the playbook doesn't even need to be run from a Mac at all! If you want to manage a remote Mac, either another Mac on your network, or a hosted Mac like the ones from [MacStadium](https://www.macstadium.com), you just need to make sure you can connect to it with SSH:
31
33
32
-
1. (On the Mac you want to connect to:) Go to System Preferences > Sharing.
33
-
2. Enable 'Remote Login'.
34
+
1. (On the Mac you want to connect to:) Go to System Preferences > Sharing.
35
+
2. Enable 'Remote Login'.
34
36
35
37
> You can also enable remote login on the command line:
36
38
>
37
-
> sudo systemsetup -setremotelogin on
39
+
> ```sh
40
+
> sudo systemsetup -setremotelogin on
41
+
>```
38
42
39
43
Then edit the `inventory` file in this repository and change the line that starts with `127.0.0.1` to:
40
44
41
-
```
45
+
```ini
42
46
[ip address or hostname of mac] ansible_user=[mac ssh username]
43
47
```
44
48
45
49
If you need to supply an SSH password (if you don't use SSH keys), make sure to pass the `--ask-pass` parameter to the `ansible-playbook` command.
46
50
47
51
### Running a specific set of tagged tasks
48
52
49
-
You can filter which part of the provisioning process to run by specifying a set of tags using `ansible-playbook`'s `--tags` flag. The tags available are `dotfiles`, `homebrew`, `mas`, `extra-packages` and `osx`.
53
+
You can filter which part of the provisioning process to run by specifying a set of tags using `ansible-playbook`'s `--tags` flag. The tags available are `dotfiles`, `homebrew`, `mas`, `extra-packages`, `vscode`, `dock`, and `osx`.
Not everyone's development environment and preferred software configuration is the same.
56
62
57
63
You can override any of the defaults configured in `default.config.yml` by creating a `config.yml` file and setting the overrides in that file. For example, you can customize the installed packages and apps with something like:
58
64
59
-
homebrew_installed_packages:
60
-
- cowsay
61
-
- git
62
-
- go
63
-
64
-
mas_installed_apps:
65
-
- { id: 443987910, name: "1Password" }
66
-
- { id: 498486288, name: "Quick Resizer" }
67
-
- { id: 557168941, name: "Tweetbot" }
68
-
- { id: 497799835, name: "Xcode" }
69
-
70
-
composer_packages:
71
-
- name: hirak/prestissimo
72
-
- name: drush/drush
73
-
version: '^8.1'
74
-
75
-
gem_packages:
76
-
- name: bundler
77
-
state: latest
78
-
79
-
npm_packages:
80
-
- name: webpack
81
-
82
-
pip_packages:
83
-
- name: mkdocs
65
+
```yaml
66
+
homebrew_installed_packages:
67
+
- cowsay
68
+
- git
69
+
- go
70
+
71
+
mas_installed_apps:
72
+
- { id: 443987910, name: "1Password" }
73
+
- { id: 498486288, name: "Quick Resizer" }
74
+
- { id: 557168941, name: "Tweetbot" }
75
+
- { id: 497799835, name: "Xcode" }
76
+
77
+
composer_packages:
78
+
- name: hirak/prestissimo
79
+
- name: drush/drush
80
+
version: '^8.1'
81
+
82
+
gem_packages:
83
+
- name: bundler
84
+
state: latest
85
+
86
+
npm_packages:
87
+
- name: webpack
88
+
89
+
pip_packages:
90
+
- name: mkdocs
91
+
```
84
92
85
93
Any variable can be overridden in `config.yml`; see the supporting roles' documentation for a complete list of available variables.
86
94
87
95
## Included Applications / Configuration (Default)
- tealdeer # Very fast implementation of tldr in Rust
203
+
- tlk/imagemagick-x11/imagemagick # Tools and libraries to manipulate images in many formats (X11 support)
204
+
- tokei # Program that allows you to count code, quickly
205
+
- tox # Generic Python virtualenv management and test command-line tool
206
+
- tree # Display directories as trees (with optional color/HTML output)
207
+
- watch # Executes a program periodically, showing output fullscreen
208
+
- wget # Internet file retriever
209
+
- wireguard-tools # Tools for the WireGuard secure network tunnel
210
+
- wrk # HTTP benchmarking tool
211
+
- yadm # Yet Another Dotfiles Manager
212
+
- yarn # JavaScript package manager
213
+
- youtube-dl # Download YouTube videos from the command-line
214
+
- yq # Process YAML documents from the CLI
215
+
- zsh # UNIX shell (command interpreter)
216
+
- zsh-history-substring-search # Zsh port of Fish shell's history search
136
217
137
218
My [dotfiles](https://github.com/geerlingguy/dotfiles) are also installed into the current user's home directory, including the `.osx` dotfile for configuring many aspects of macOS for better performance and ease of use. You can disable dotfiles management by setting `configure_dotfiles: no` in your configuration.
138
219
@@ -144,16 +225,16 @@ Finally, there are a few other preferences and settings added on for various app
144
225
145
226
It's my hope that I can get the rest of these things wrapped up into Ansible playbooks soon, but for now, these steps need to be completed manually (assuming you already have Xcode and Ansible installed, and have run this playbook).
0 commit comments