Forum Discussion

DanS_24772's avatar
DanS_24772
Icon for Nimbostratus rankNimbostratus
Jun 12, 2014

Easy way to find/replace a few pool members

What's the best way to swap X and Y pool members with A and B, assuming hundreds of affected pools and variable port numbers?

 

Can tmsh do this or is editing the bigip.conf file the best way to go?

 

Thanks

 

1 Reply

  • I would probably do this using a script with a loop to run tmsh commands against pools.

     

    something like:

     

    $pools = "pool1 pool2 pool3"

     

    $a = 5.5.5.5:80

     

    $b = 6.6.6.6:80

     

    $x = 1.1.1.1:80

     

    $y = 1.1.1.2:80

     

    for poolname in $pools; do

     

    tmsh modify ltm pool $poolName members add { $x $y};

     

    tmsh modify ltm pool $poolName members delete { $a $b};

     

    done