Skip to content

Commit 3376c1a

Browse files
committed
Fixes geerlingguy#85: Make it easier to use this playbook to manage remote Macs.
1 parent 2dc641d commit 3376c1a

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
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.
88

9-
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 set of playbooks over time.
9+
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.
1010

1111
*See also*:
1212

@@ -21,10 +21,25 @@ This is a work in progress, and is mostly a means for me to document my current
2121
2. [Install Ansible](http://docs.ansible.com/intro_installation.html).
2222
3. Clone this repository to your local drive.
2323
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 -K` inside this directory. Enter your account password when prompted.
24+
5. Run `ansible-playbook main.yml -i inventory --ask-become-pass` inside this directory. Enter your account password when prompted.
2525

2626
> 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.
2727
28+
### Use with a remote Mac
29+
30+
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+
32+
1. (On the Mac you want to connect to:) Go to System Preferences > Sharing.
33+
2. Enable 'Remote Login'.
34+
35+
Then edit the `inventory` file in this repository and change the line that starts with `127.0.0.1` to:
36+
37+
```
38+
[ip address or hostname of mac] ansible_user=[mac ssh username]
39+
```
40+
41+
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.
42+
2843
### Running a specific set of tagged tasks
2944

3045
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`.
@@ -133,13 +148,6 @@ It's my hope that I can get the rest of these things wrapped up into Ansible pla
133148
6. Set mouse tracking rate.
134149
7. Configure extra Mail and/or Calendar accounts (e.g. Google, Exchange, etc.).
135150

136-
### Applications/packages to be added:
137-
138-
These are mostly direct download links, some are more difficult to install because of custom installers or other nonstandard install quirks:
139-
140-
- [iShowU HD](http://www.shinywhitebox.com/downloads/iShowU_HD_2.3.20.dmg)
141-
- [Adobe Creative Cloud](http://www.adobe.com/creativecloud.html)
142-
143151
### Configuration to be added:
144152

145153
- I have vim configuration in the repo, but I still need to add the actual installation:

inventory

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
[localhost]
2-
127.0.0.1
1+
[all]
2+
127.0.0.1 ansible_connection=local

main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
- hosts: all
3-
connection: local
43

54
vars_files:
65
- default.config.yml

0 commit comments

Comments
 (0)