Ansible 2.1.1.0 Core. With our network, we have a system where we switch back and forth between two groups of servers. In the F5, we use iRules and priority groups to direct the traffic to the live group of servers. Right now, we have to go into the console manually and update the priority group setting for each server. We’d like to script this. We have some ansible scripting that moves nodes in and out of pools, but the bigip_pool_member module doesn’t have any capability at the present time for adjusting the priority group setting. We’ve got the commands to do this via the F5 cli figured out, but these require logging on to the F5 to run. I guess we’re trying to figure out how to run those commands remotely on an F5 from our ansible server.
Hey Scott,
If it’s not already in the pool_member module i would first suggest you open an issue about this at our f5-ansible repository and the change will percolate upstream to ansible core
https://github.com/F5Networks/f5-ansible
Beyond that, if your version of BIG-IP is >= 12.x, you can use Ansible’s native ‘command’ module to run commands directly on the bigip in non-appliance mode; ie, a root cli.
If you version is < 12.x, then the other 2 options are
-
Referring to the bigip_command module in the above f5-ansible repository. This lets you run the necessary tmsh commands to move it in and out. This module is not yet part of core though. It will be in Ansible 2.4
-
use the ‘raw’ module to accomplish similar to the ‘command’ module on 12.x
None of the mentioned work is idempotent though.
The idempotency comes by filing an issue at the URL above, having myself provide a fix, and then upstreaming the result.
Hope that helps,
-tim
F5 module maintainer