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
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
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
Addition of your 3 modules, slightly modified:
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
Based on comments here on getting new modules included in ansible, 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
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.