# Ansible Linode NodeBalancer Module

**URL:** <https://forum.ansible.com/t/ansible-linode-nodebalancer-module/18741>\
**Category:** Ansible Developer\
**Created:** [July 13, 2015, 12:18pm UTC](https://forum.ansible.com/t/ansible-linode-nodebalancer-module/18741 "2015-07-13T12:18:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duncan\_Morris](https://avatars.discourse-cdn.com/v4/letter/d/8e7dd6/32.png) [@Duncan\_Morris](https://forum.ansible.com/u/Duncan_Morris)\
**Post date:** [July 13, 2015, 12:18pm UTC](https://forum.ansible.com/t/ansible-linode-nodebalancer-module/18741/1 "2015-07-13T12:18:26Z")

</div>

Hi all.

I’ve just written a module to manage the three parts of a Linode NodeBalancer (The Node Balancer, the config and the nodes themselves). I am successfully using it for deployments after installing it locally and adding it to the library folder.

The code is on Github. - [https://github.com/DistilledLtd/ansible-linode-nodebalancer](https://github.com/DistilledLtd/ansible-linode-nodebalancer)

I’d love to get some help / and feedback in order to get the code to a point where it could be considered for the ansible-module-extras repository.

The biggest thing I’m unhappy with is a few functions that have been copied / pasted between the 3 files. I originally had these functions in another file that I imported from. This worked when run via the test\_module script, but didn’t work once I was running it from the library, in a playbook. I wasn’t able to get it working importing the files, and ended up giving up copying pasting.

On top of that any general thoughts / comments / feedback would be appreciated. This is the first ansible module I’ve written.

Thanks in advance…

Duncan

---

<div class="post-metadata">

**Author:** ![James\_Addison](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@James\_Addison](https://forum.ansible.com/u/James_Addison)\
**Post date:** [September 10, 2015, 9:41pm UTC](https://forum.ansible.com/t/ansible-linode-nodebalancer-module/18741/2 "2015-09-10T21:41:06Z")

</div>

Duncan, nice work! While I’m not a core Ansible team member, I hope you don’t mind that I’ve taken your code and made a couple of pull requests to Ansible repos:

Common Linode functions (which deals with the copy/paste issue you mentioned):  
[https://github.com/ansible/ansible/pull/12315](https://github.com/ansible/ansible/pull/12315)

Addition of your 3 modules, slightly modified:  
[https://github.com/ansible/ansible-modules-core/pull/2020](https://github.com/ansible/ansible-modules-core/pull/2020)

The latter also includes several improvements for the original Linode module (used to manage VPS instances) as well. Note that the NodeBalancer support still lacks the https protocol support.

Cheers - I hope that these PRs can make it in to the Ansible 2.x product stream.  
James

---

<div class="post-metadata">

**Author:** ![James\_Addison](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@James\_Addison](https://forum.ansible.com/u/James_Addison)\
**Post date:** [September 26, 2015, 6:33am UTC](https://forum.ansible.com/t/ansible-linode-nodebalancer-module/18741/3 "2015-09-26T06:33:26Z")

</div>

Based on comments here on getting new modules included in ansible, [https://groups.google.com/forum/m/#!topic/ansible-devel/bJF3ine7890](https://groups.google.com/forum/m/#!topic/ansible-devel/bJF3ine7890), I suppose I should have targeted 'extras' instead of 'core' with these new Linode modules.

Would there be any conflict between the original Linode module in core and these new modules put in extra?

Also, I made changes to the original Linode module for indempotence fixes - I suppose I should split the pull request out separately...

Input would be appreciated!  
James

---

<div class="post-metadata">

**Author:** ![Shawn\_Silva](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Shawn\_Silva](https://forum.ansible.com/u/Shawn_Silva)\
**Post date:** [February 10, 2016, 6:37pm UTC](https://forum.ansible.com/t/ansible-linode-nodebalancer-module/18741/4 "2016-02-10T18:37:38Z")

</div>

I am interested in seeing these additions make it into the repos. I was actually starting to look into adding similar features myself when I stumbled on this.

It looks like this may have fell off the radar, with both pull requests not having any response for awhile.
