Forum Discussion
Mattews
Sep 22, 2020Cirrus
How to apply the same iRule to multiple application with AS3 declaration?
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
No RepliesBe the first to reply
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