7 ms·
Mac-dev-playbook – Mac setup and configuration via Ansible
- ttaylorr 10y agoThis seems interesting. I use a Makefile to bootstrap my machine and manage my dotfiles. I understand the appeal of Ansible, but I think it's more robust features are most useful in more complex environments than a personal laptop. My Makefile seems to do the trick.
- nkristoffersen 10y agoDo you have your makefile on github?
- hermanhermitage 10y agoLooks like this is it: https://github.com/ttaylorr/dotfiles/blob/work-gh/Makefile https://github.com/ttaylorr/dotfiles/blob/work-gh/Makefile
- mi100hael 10y agoYuck. What's the point of a Makefile if every single rule is phony?
- querulous 10y agoi use a bash script not a makefile, but it's (mostly) idempotent: https://gist.github.com/talentdeficit/253fd1eaf25cb41e5c24a467f4c8f914 https://gist.github.com/talentdeficit/253fd1eaf25cb41e5c24a4...
- lukeadams 10y agoSince I've been playing with NixOS, this project reminded me of https://github.com/LnL7/nix-darwin https://github.com/LnL7/nix-darwin which lets you use a system-wide configuration.nix on OS X. Never tried it but it looks neat.
- mitchty 10y agoI actually use this, using it to replace my old ansible setup. I've got a lot of things I need to merge into there after more testing but yep its neat. Not as great as the nixos version but every bit helps.
- nextos 10y agonix & guix are great. Making whole-system configurations declarative and reproducible is a huge step forward once things get mildly complicated.
- nmat 10y agoI thought several times about having an automated environment setup for my personal laptop, but I usually come to the conclusion that the time it would take me to maintain these scripts would probably exceed the time I spend doing the setup every 3-4 years (xkcd https://xkcd.com/1319/ https://xkcd.com/1319/). I usually now just install things as I need them and I feel that it is a smooth process. Installing software and managing packages has become much easier in recent years.
- matt_wulfeck 10y agoMe too. I've settled on just storing my dotfiles in dropbox as good enough. Just upgraded to a MBP and it was no issue.
- astrosi 10y agoIf you can have a good estimate of the time it would take to do it then this xkcd is better source! https://xkcd.com/1205/ https://xkcd.com/1205/
- stinos 10y agoI thought the exact same thing and recently put it to the test, and my estimate now is that in my case in about 15 years the time spent on creating the automation will likely have been payed off: 2 machines every 5 years, let's say 2 days to get them manually installed/configured completely vs about 6 days spent on the automation now. At least, if my stack or aplication preferences etc doesn't change too much. As a bonus: I learned some new stuff while doing it. So in the end for me it was worth it because of that learning and because I really dislike repeatedly installing stuff, waiting for installers to complete, customizing, ... But let's see again after a couple of iterations if I still think that way (e.g. if it turns out the automation scripts require too much caretaking, as per xkcd).
- rallycarre 10y agoWindows equivalent for application installs(no configuring) https://ninite.com/ https://ninite.com/.
- stinos 10y agoWhich is just one of many, e.g. more scriptable example: Powershell DSC. Ansible should also run on Windows. There's also SaltStack and Otter.
- omtinez 10y agoI'd say that the Windows equivalent is https://chocolatey.org/ https://chocolatey.org/. It has the largest amount of "packages" from all other similar efforts that I have seen.
- lukeadams 10y agoI second Chocolatey. There's also a (supported by Choco) puppet plugin which makes client installations as simple as package { 'notepadplusplus': ensure => '6.7.5', provider => 'chocolatey', } I've used it on a few client machines with no issues.
- msbarnett 10y agoFirst one of these in ages I've seen that isn't riddled with settings that will silently reduce system security for anyone foolish enough to run it. Be aware it does apply some pretty idiosyncratic settings from his dotfiles, though, like disabling sleep and hibernate. I'd take some time to edit those prior to using.
- bartvk 10y agoExactly. It makes sense when you have a 128 GB SSD, but for most people, it's a bad idea to disable hibernation. And local Time Machine.
- geerlingguy 10y agoThe idea is you'd point the thing at your own dotfiles. I just have it use mine since I built it :)
- foolinaround 10y agowow - this is really cool, and it is a great initiative. If someone would take a similar approach to installing (on linux) a particular version of ElementaryOS or linux, and puts together a set of recipes that would get it all souped up for development etc, that would be really great!! One can even take it further to use an OS like Bodhi Linux which seems stripped down for the task, and use ansible instead of the native scripting etc. One can get a superb development environment even with an older lower powered laptop; a lot of the grunt work can be automated away. This has to be an open-sourced effort because a thousand combinations are possible and one needs a easy way to select what one needs, and this was my issue with ninite. It would install everything, and it also would configure etc .
- jaequery 10y agoitd be cool if theres way to install apps too
- bartvk 10y agoHe could have done this with the mas utility. http://lifehacker.com/mas-updates-and-installs-mac-app-store-apps-from-the-co-1791919584 http://lifehacker.com/mas-updates-and-installs-mac-app-store... The mas utility can be installed via a quick "brew install mas".
- geerlingguy 10y agoIt is integrated with mas (the CLI helper for the Mac App Store). You just pass in the IDs of whatever apps you want installed, and it will do the rest (even prompting for the App Store login). See the role it's using: https://github.com/geerlingguy/ansible-role-mas https://github.com/geerlingguy/ansible-role-mas
- eslaught 10y agohttps://github.com/geerlingguy/macos-virtualbox-vm https://github.com/geerlingguy/macos-virtualbox-vm Thanks for this. I'm going to have to try these instructions at some point. A while back I was trying to do this, and couldn't make any of the instructions work. TL;DR: Installing macOS in a VM is more trouble than it's worth. I gave up and switched to VMWare instead, but I'd prefer to stick to VirtualBox since it's what I use for everything else.
- nunez 10y agoAnsible is great and all, but I've been using a bash_profile to set up my workstations for years and it's worked great. Doesn't require third-party tools and uses bash, so it can literally run on anything, including Cygwin and LXSS (Windows). For those interested: https://github.com/carlosonunez/setup https://github.com/carlosonunez/setup
- dqv 10y agoAh, a very seasoned bash profile. Thanks for sharing.
- rajangdavis 10y agoWhat is the stayfocusd.json for? It looks like it's for blocking certain sites but how does it work?
- nunez 10y agoI used a Chrome Extension called StayFocusd to block out time wasting sites while trying to get some work done. That JSON configures its settings. Haven't needed that extension for a while because I'm actually busy these days!
- ykler 10y agoI don't have a problem with third party tools or need to run a setup scrip on Cygwin or LXSS, but shell scripting just seems easier than a tool like ansible because you have a full programming language (albeit a terrible one), and you can use familiar command line utilities to do everything. (You can use them in ansible too, but it is frowned on -- you are supposed to relearn how to do everything using modules that are usually less powerful than the equivalent command line utilities.) I have never had to manage a huge fleet of servers, so maybe ansible has advantages in that setting, but for setting up a single box it just seems to make everything harder.
- geerlingguy 10y agoWhen you have three+ Macs to configure, it starts looking more like a fleet and less like a single computer :) The main advantage I see is at it's a lot easier to reason with Yaml configuration than shell scripts with a ton of conditionals, and it's also easier to use Ansible's modules to make sure you can reprovision whenever you want to get new things added or old things removed.
- yo-code-sucks 10y agoOh Jeff, you'll never be employable with your shitty skills.
- ronaldvalente 10y agoVery nicely done, I do a clean install every point release of macOS so having automation such as this has been crucial.
- vr46 10y agoNice, but I think the days of Chef/Puppet/Ansible-based setups might be gone. Boxen is deprecated in favour of the excellent Strap: https://github.com/mikemcquaid/strap https://github.com/mikemcquaid/strap which I have customized to use a post-completion script to configure defaults (e.g. https://github.com/mathiasbynens/dotfiles/blob/master/.macos https://github.com/mathiasbynens/dotfiles/blob/master/.macos) and initial setup of Vim. Homebrew and shell scripting. What more could you need? :)