I looked into battleschool. The way it overally works seems better (having it's own command and a simple config with just a dotfile) but I really like ansible roles and I really enjoy using brew and brew cask to install everything, it's more neat and more undoable than using a pkg command directly. For now, I don't know which design I'll choose but I still like using the ansible-playbook command. I don't want to hide the internal mechanics of my tool. Ansible is great ! I still want to use it !
thanks ! That's exactly what I was looking for when I started to create osxc ! I will look into it. In fact osxc should more be seen as a set of roles than anything else, so I think it can be easily plugged with an existing solution such as battleschool.
The main difference between shell scripts and Ansible playbooks is that shell scripts are imperative, while playbooks are declarative and idempotent.
A shell script will be something like
install this package
create this file
change this line in a configuration file
While a playbook is like
make sure this package is installed
make sure this file exists
make sure this line is like this in this config file
What happens if you want change something in your configuration script? In most cases you can't just replay a shell script, because it will try to do a lot of things that are already done and it is very hard to write idempotent commands.
Ansible on the other hand only performs the tasks in the playbook that need to be performed: if the condition is already satisfied, there's nothing to do.
This is especially convenient if your script fails at some point: you can fix the directive and replay the playbook, and it will restart from where it left off. With shell scripts you have to do it manually (comment out the first part?), which is error-prone and time-consuming.
I understand what you're saying. I just started this a few days ago and wanted to share it with the community. For now, this is more: how I setup my computer than how everyone should do it. But I found that even if a simple bash script would do the same, the ansible roles gives me the possibility to have reusable components. (my boot.sh is terrible, I know, I have to find something else ...)
One blind spot that all of these OS X configuration tools appear to have is the App Store. Not through any fault of their own I suspect... more that Apple hasn't opened the App Store app to being scriptable. But a command-line way of installing/reinstalling/updating App Store apps would be great.
The zdw-mentioned autopkg has the capability of looking at your installed AppStore apps and checking for updates, and further can package them(with embedded receipt/DRM) to a patch mgmt system.
https://github.com/autopkg/nmcspadden-recipes/tree/master/Ap...
It works with any pkg deployment system, although autopkg itself ships with Munki support. Ansible and osxc by extension are about ConfigMgmt, of course, but conflating mgmt systems is common and understandable.
boxen looked nice to me, but I really wanted to avoid puppet (even if I never tried, it's often compared to chef and I have lots of bad experiences with chef !)
This is neat. I think it'd be pretty awesome if it were possible to download all the dmg's/installers/apps in a folder/drive without installing them so at a later date you could a) install everything without having to wait hours to download or require an internet connection and b) keep your packages up to date (almost as a backup) running the script every once in a while to make sure you have the most up to date packages/installers.
A couple of weeks ago I decided to backup my hard drive, reformat it and reinstall OS X Mavericks to get rid of the cruft that seems to have built up in 4 years, updating from every OS since Mac OS X 10.5 Leopard.
I made halfhearted attempts to organize my dotfiles and configuration in the past, like the cool kids do on Github. That’s when I learned about Homebrew Cask (http://caskroom.io) which makes it super easy to install the GUI apps I install on whatever Mac I’m using—iTerm, Transmission, Vagrant, Virtual Box, etc.
Cask could be awesome, but it's not at this stage. There are no upgrades, in many cases it doesn't work. Most apps complain that they are not in /Applications, but are in ~/Applications instead and so on. At the end of the day, it duplicates some of the Homebrew functionality - some non-GUI packages are getting into Cask, because possibly Homebrew doesn't want them - it's a bit confusing as well. I think efforts should be put into merging into Homebrew instead of keeping it separate.
The osxc website and documentation is riddled with basic grammar and spelling errors and incorporates slang like "osxc got your back". That doesn't inspire much confidence.
Edit: Wow with the downvotes. I'm just offering feedback in a polite manner for what a lot of others are probably thinking.
I know, my english is not very accurate (I'm french). Feel free to do some pull-requests to correct my grammar errors, it'll help me a lot ! Both for this website and my english. Thank you !
Note that you shouldn't be confident using it too, it's still a very early project and, at the beginning, it was only meant to be used by me ... But I intend to make it much better !
[+] [-] zdw|12 years ago|reply
https://github.com/32degrees/battleschool
If you're going to do this on a wider scale (multiple machines, managed in an organization), the best tools right now are AutoPKG and Munki:
https://github.com/autopkg/autopkg http://code.google.com/p/munki/
[+] [-] robinricard|12 years ago|reply
[+] [-] robinricard|12 years ago|reply
[+] [-] taylorlapeyre|12 years ago|reply
https://github.com/taylorlapeyre/.files/blob/master/osx/boot...
[+] [-] ot|12 years ago|reply
A shell script will be something like
While a playbook is like What happens if you want change something in your configuration script? In most cases you can't just replay a shell script, because it will try to do a lot of things that are already done and it is very hard to write idempotent commands.Ansible on the other hand only performs the tasks in the playbook that need to be performed: if the condition is already satisfied, there's nothing to do.
This is especially convenient if your script fails at some point: you can fix the directive and replay the playbook, and it will restart from where it left off. With shell scripts you have to do it manually (comment out the first part?), which is error-prone and time-consuming.
[+] [-] robinricard|12 years ago|reply
[+] [-] bdunbar|12 years ago|reply
We use ansible for configuring servers. Using this to configure our machines would be cake.
[+] [-] kbar13|12 years ago|reply
[+] [-] jimmcslim|12 years ago|reply
[+] [-] sacrilicious|12 years ago|reply
[+] [-] weitzj|12 years ago|reply
[+] [-] robinricard|12 years ago|reply
[+] [-] rafeed|12 years ago|reply
[+] [-] xbryanx|12 years ago|reply
[+] [-] robinricard|12 years ago|reply
[+] [-] microtonal|12 years ago|reply
[+] [-] alwillis|12 years ago|reply
A couple of weeks ago I decided to backup my hard drive, reformat it and reinstall OS X Mavericks to get rid of the cruft that seems to have built up in 4 years, updating from every OS since Mac OS X 10.5 Leopard.
I made halfhearted attempts to organize my dotfiles and configuration in the past, like the cool kids do on Github. That’s when I learned about Homebrew Cask (http://caskroom.io) which makes it super easy to install the GUI apps I install on whatever Mac I’m using—iTerm, Transmission, Vagrant, Virtual Box, etc.
And now I have them in a Brewfile (http://robots.thoughtbot.com/brewfile-a-gemfile-but-for-home...) under version control in case I need to install the whole shebang on another Mac.
And now brew update && brew upgrade updates everything.
[+] [-] kolev|12 years ago|reply
[+] [-] emdowling|12 years ago|reply
[+] [-] mukundmr|12 years ago|reply
[+] [-] runjake|12 years ago|reply
Edit: Wow with the downvotes. I'm just offering feedback in a polite manner for what a lot of others are probably thinking.
[+] [-] robinricard|12 years ago|reply
Note that you shouldn't be confident using it too, it's still a very early project and, at the beginning, it was only meant to be used by me ... But I intend to make it much better !
[+] [-] moisy|12 years ago|reply
[+] [-] holyjaw|12 years ago|reply