Live data from Hacker News

Osxc – Simple configuration tool for OS X

osxc.github.io

11–20 of 45 posts

Re: Osxc – Simple configuration tool for OS X

#11

I'm struggling to see how this is better than a simple bootstrapping script. Every feature you list can be accomplished in very few lines of bash: https://github.com/taylorlapeyre/.files/blob/master/osx/boot...

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 ...)

Understandable. Cheers!

Re: Osxc – Simple configuration tool for OS X

#12
post #4

Another project that uses the same tools (Ansible/Homebrew) to accomplish the same/similar goals: 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/

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.

Re: Osxc – Simple configuration tool for OS X

#14

I'm struggling to see how this is better than a simple bootstrapping script. Every feature you list can be accomplished in very few lines of bash: https://github.com/taylorlapeyre/.files/blob/master/osx/boot...

Standalone, it's 6 o' one, half-dozen of another.

We use ansible for configuring servers. Using this to configure our machines would be cake.

Re: Osxc – Simple configuration tool for OS X

#15
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.

Re: Osxc – Simple configuration tool for OS X

#16
post #15

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 !

Re: Osxc – Simple configuration tool for OS X

#17

I'm struggling to see how this is better than a simple bootstrapping script. Every feature you list can be accomplished in very few lines of bash: https://github.com/taylorlapeyre/.files/blob/master/osx/boot...

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.

Re: Osxc – Simple configuration tool for OS X

#18
post #17

I'm struggling to see how this is better than a simple bootstrapping script. Every feature you list can be accomplished in very few lines of bash: https://github.com/taylorlapeyre/.files/blob/master/osx/boot...

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…

couldn't explain it better !

Re: Osxc – Simple configuration tool for OS X

#19
post #17

I'm struggling to see how this is better than a simple bootstrapping script. Every feature you list can be accomplished in very few lines of bash: https://github.com/taylorlapeyre/.files/blob/master/osx/boot...

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…

I can appreciate this explanation, thanks.

I will, however, offer that a well-designed shell script should be able to be run many times in a row without causing any problems. The above script is an example of this.

If I wanted to change something in my configuration script, that's totally fine! In fact, I do change it all the time. Since all it does is ask you whether you want homebrew to install something, there is very little risk (if any) of something "going wrong."

Re: Osxc – Simple configuration tool for OS X

#20
post #4

Another project that uses the same tools (Ansible/Homebrew) to accomplish the same/similar goals: 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/

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 !
Post reply on HN