# "Ansible for Rubyists"

**URL:** <https://forum.ansible.com/t/ansible-for-rubyists/12718>\
**Category:** Ansible Project\
**Created:** [April 24, 2013, 11:29pm UTC](https://forum.ansible.com/t/ansible-for-rubyists/12718 "2013-04-24T23:29:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [April 24, 2013, 11:29pm UTC](https://forum.ansible.com/t/ansible-for-rubyists/12718/1 "2013-04-24T23:29:15Z")

</div>

This is rather rough and could use some feedback (and even upgrades to my Ruby) but I was talking to someone today who wanted to know how to write modules, even fact modules that take parameters, in Ruby.

So I made an example: [https://github.com/ansible/ansible-for-rubyists/](https://github.com/ansible/ansible-for-rubyists/)

Feedback welcome! Meant to be more conceptual than systems management based.

I hope this helps people understand how to write ansible extensions in other (dynamic, at least) languages.

---

<div class="post-metadata">

**Author:** ![Michel\_Blanc1](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@Michel\_Blanc1](https://forum.ansible.com/u/Michel_Blanc1)\
**Post date:** [April 25, 2013, 6:06am UTC](https://forum.ansible.com/t/ansible-for-rubyists/12718/2 "2013-04-25T06:06:27Z")

</div>

Example is crystal clear.

However, instead of doing a ruby centric example, wouldn't it be nice to  
have a rosetta stone repos with examples in many languages ?

M

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [April 25, 2013, 11:41am UTC](https://forum.ansible.com/t/ansible-for-rubyists/12718/3 "2013-04-25T11:41:09Z")

</div>

Yeah, that’s not a bad idea. I can see this folding into Ansible-examples with a Perl example too at some point, and an example of how to do the same in Bash (but probably not using JSON inputs).

Ruby seemed to be the most popular one people wanted to use, and had some extra interest because  
a couple of major configuration management systems happen to be written in it 🙂

I believe people will be able to adapt things to their needs.

Perhaps in the not-too-distant future.

---

<div class="post-metadata">

**Author:** ![Dag\_Wieers](https://avatars.discourse-cdn.com/v4/letter/d/45deac/32.png) [@Dag\_Wieers](https://forum.ansible.com/u/Dag_Wieers)\
**Post date:** [April 26, 2013, 9:53am UTC](https://forum.ansible.com/t/ansible-for-rubyists/12718/4 "2013-04-26T09:53:56Z")

</div>

Will there be a change to the policy that all modules in the Ansible release have to be written in Python ?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [April 26, 2013, 12:13pm UTC](https://forum.ansible.com/t/ansible-for-rubyists/12718/5 "2013-04-26T12:13:43Z")

</div>

Nope, ansible-core modules still need to be a Python.

This is just to demonstrate things to folks who are interested in Ruby development.
