Hi, I have an ansible module that adds and removes servers from the load balancer. If I do:
ansible localhost -m modulename -a ‘servername=foo inbalancer=present’
it adds the module to the load balancer and reports changed if it wasn’t there before, and not changed if it was already there.
Same for ‘inbalancer=absent’ It takes the server out of the load balancer and reports changed or not changed.
So I know if the server is in the balancer when I start through this section of the code.
I’d like to have the module set a variable that can be (a) reported on the output and (b) tested for in a playbook. I’m more interested in reporting, so I can have a shell script that reports the state of my load balancer and all it’s servers.
After much reading, I think I need to ask for an approach.
Thanks,
Ed Greenbert