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.
willsweeper_131
Nimbostratus
Mar 06, 2014Thanks Kevin for the quick response. below is the script that I ran,
!/bin/bashfor virtual in
tmsh list /ltm virtual one-line |awk -F" " '{ print $3 }' |grep VIP_zzz; do
tmsh modify /ltm virtual $virtual rules { Server_Response_Header_Remove }
done
But the rule didn't apply.
then I check the virtual server, the irule "Server_Response_Header_Remove" was not applied.
I then ran the first half of the command to list all the virtual servers, but it only came back with "requested", see below output.[admin@nyadltm01:Active] ~ tmsh list /ltm virtual one-line |awk -F" " '{ print $3 }'
requestedif I just run "tmsh list /ltm virtual", it came back with all the virutal servers on the ltm, the ltm is running v10.3 please let me know if anything else I can try, thanks. Will
willsweeper_131
Nimbostratus
Mar 06, 2014sorry for the bad format
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