cancel
Showing results for 
Search instead for 
Did you mean: 

need assistance to automate "tmsh edit ltm rule example.irule" via ansible or python.

sridhar
Nimbostratus
Nimbostratus

My playbook job:

1) Create a node for the new server

2) create a pool and add the Node to the pool.

3) VIPs and iRules will be already created. Just iRule need to be updated with the new entry

 

Need assistance on 3rd step, I would like to add new entry ( example: "*XYZ*" { pool XYZ.pool } ) to irule at the end using ansible.

my_irule:

when HTTP_REQUEST {      switch -glob [HTTP::uri] {        "*ABC*" { pool ABC.pool }      }   }

 

Also, I have tried "tmsh edit ltm rule example.irule" from bash and ended up with below.

"Unexpected Error: edit mode must be invoked from an interactive tmsh session"

When I'm able to pull content of irule using "tmsh list ltm rule example.irule" from bash.

Is there any specify reason that edit must be invoked from tmsh session?

  

 

0 REPLIES 0