ansible/ansible-modules-extras — pull request #119 by swimlappy (2014-11-25 20:52:33+00:00)
Title: Fix some logical issues with enabling/disabling a server on the A10.

Hello,

I tried testing the A10 module and ran into a few issues. I'm hoping perhaps these changes will get accepted. Specifically the problems I ran into were

* When trying to enable/disable a server on the A10, both the server name and IP address had to be specified. If the IP address was not specified in the playbook, the code would fail thinking you were trying to "create a server" and this was required. If you only want to enable/disable a server, which is a pretty simple thing that happens a LOT, this code will make it easier to do that. See lines 198-200.
* Add a new function to determine if the status of a server needs to be updated. See additional lines 237-246.
* Only add optional parameters to the json_post array if they were specified in the module as parameters. My AXAPI calls were including a ports parameter when they didn't need one. See additional lines 190-199.
* The a10_server.py code is looking for a module parameter called "write_config", but the documentation doesn't mention that. Make that an optional parameter, or perhaps just update the documentation. Either way, this code allows you to be more flexible. See lines 254-255.

Hope this helps others!

Jason