Forum Discussion
Kevin_Stewart
Feb 04, 2014Employee
I don't know yet that you can actually create an iRule on the command line, within the single tmsh create command. One workaround is to create the iRule first and then pipe it to the tmsh create command. Example:
printf "when HTTP_REQUEST { log local0. \"here\" }" > test-rule
tmsh create ltm rule my-test-rule `cat test-rule`
Then to apply it to a virtual server:
tmsh modify virtual my-virtual rules { my-test-rule }