cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply the same iRule to multiple application with AS3 declaration?

Mattews
Cirrus
Cirrus

Hi,

 

I need to apply a single dynamic iRule (already configured on the BIGIP) to multiple application. Each time that there is a new change request the playbook (ansible), in conjunction with templates, must associates that iRule with the new application.

 

For the moment I have tried in this way:

 

[   {     "op": "add",     "path": "/{{ Layer }}/TEST_{{ ServiceName }}",     "value": {       "class": "Application",       "template": "generic",       "{{ ServiceName }}": {         "class": "Service_HTTP",         "iRules": ["dynamic_irule"],         "virtualPort": {{ virtualPort| int  }},         "virtualAddresses": ["{{ IPvirtualServer }}"],         "persistenceMethods": ["{{ metodoPersistenza }}"],         "pool": "{{ Pools.0.nomePool }}"       },       "{{ Pools.0.nomePool }}": {         "class": "Pool",         "monitors": {{ Pools.0.monitor }},         "members": [{             "servicePort": {{ Pools.0.membersPort|int }},             "serverAddresses": {{ Pools.0.IPmembers|list }}         }]       },       "dynamic_irule": {         "class": "iRule",         "iRule": {           "url": "/Frontend/TEST_{{ ServiceName }}/dynamic_irule"         }       }     }   } ]

 

I only need to find a precise way to declare the iRule, ansible returns this error:

["/Frontend/TEST_Test_Var_With_iRule/dynamic_irule/iRule: url /Frontend/TEST_Test_Var_With_iRule/dynamic_irule for /Frontend/TEST_Test_Var_With_iRule/dynamic_irule/iRule must include host"], "message": "declaration is invalid"}

TEST_Test_Var_With_iRule is the name of my app (it's all placed in variables), can you suggest me something to address this issue?

 

Thanks

0 REPLIES 0