Forum Discussion
willsweeper_131
Nimbostratus
Mar 04, 2014Add an iRule to multiple virtual servers
I am looking for a script to add/apply an irule to a list of virtual servers, or virtual servers that contain "www" in the name.
Thanks.
Kevin_Stewart
Employee
Mar 06, 2014Hmm, that's what I expected it to look like. Let's work through this iteratively then.
tmsh list /ltm virtual |grep "ltm virtual"
That should give you something like this:
ltm virtual vip_oid.s2boss.corp.xxxxxxxxxxxxxxx.com {
If you see several lines that look something like this, then add the AWK back in:
tmsh list /ltm virtual |grep "ltm virtual" |awk -F" " '{ print $3 }'
The idea here is that you're taking this returned line, splitting it on the empty space, and extracting the third element, which should be the VIP name. Give that a try.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects