PG0581
Jun 28, 2019Cirrus
bigip_irule
I'm trying to create an iRule with the following task: - name: iRule
bigip_irule:
module: ltm
name: myRule
src: /var/tmp/myRule.tcl
state: present
provider:
ser...
Hello PG0581
Documentation says "src: The iRule file to interpret and upload to the BIG-IP".
In the same article also says "src: The filename that included the iRule source (Sample:
/opt/src/irules/example1.tcl)"
REF - https://clouddocs.f5.com/products/orchestration/ansible/devel/modules/bigip_irule_module.html
So the file should be located in /var/tmp folder in your ansible machine. Does it help?
KR,
Dario.
BTW, that's the implementation code for this section in 'bigip_irule'.
@property
def src_content(self):
if not os.path.exists(self._values['src']):
raise F5ModuleError(
"The specified 'src' was not found."
)
with open(self._values['src']) as f:
result = f.read()
return result
REF - https://github.com/F5Networks/f5-ansible/blob/devel/library/modules/bigip_irule.py