migrating from chef to ansible

2,214 views
Skip to first unread message

Guy Matz

unread,
Sep 16, 2014, 9:12:34 AM9/16/14
to ansible...@googlegroups.com
Hello!  I need  to convert a chef cookbook to ansible as part of a proof-of-concept . . .  anyone have a thoughts/suggestion about the best way to go about this?  any pitfalls, etc. to avoid?

I've just been going through the cookbook and trying to translate 1:1, but the cookbook is full of spaghetti code and other chef-isms that don't translate well . . .  for example, this cookbook works for both linux and windows which - I think! - would need to be separated out into different playbooks in ansible . .. 

Thanks a lot!
Guy

Michael DeHaan

unread,
Sep 16, 2014, 10:46:55 AM9/16/14
to ansible...@googlegroups.com
I'd recommend figuring out what the end result of the cookbook does, and then write it in ansible, rather than trying to read it and port it.

Chef code can get (no offense intended to Chef) programmatically complex, when too much Ruby is involved, and that can lead to frustration when Ansible usually has a preference about how things should be done (simply, but also idiomatically).

I'd find just one part of your systems to automate with ansible, and then grow into more and more as you go.

Ansible can definitely call multiple plays in the same playbook, so addressing Windows and Linux from one ansible-playbook run is quite possible.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CABnTgtV_Vc%3DzMkfD676yuEqkkjjdNBHfg%3Ds%3D_Wor1_N9BSK-4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages