on 09-Mar-2015 11:24
Problem this snippet solves:
This is a script will do an A record lookup for a hostname and populate the specified pool with all available A records. The script will not change the existing pool member(s) or modify their connections if the next A record matches. Only changes to the associated A record will result in changes to the pool members. The script will error out and print a help message if any of the following conditions are met: 6 arguments are not provided (BIG-IP address, BIG-IP user, BIG-IP password, A record query, pool name, pool member port), the port is an invalid integer (valid ports: 1-65535), BIG-IP connection cannot be made, the pool does not exist, or no A record returned.
How to use this snippet:
Code :
#!/usr/bin/ruby require 'rubygems' require 'f5-icontrol' require 'resolv' def usage puts $0 + '' exit end # make sure enough arguments have been provided usage if $*.size < 6 $*[5] = $*[5].t...