W3cubDocs

/Ansible

bigip_irule - Manage iRules across different modules on a BIG-IP.

New in version 2.2.

Synopsis

Manage iRules across different modules on a BIG-IP.

Requirements (on host that executes module)

  • f5-sdk

Options

parameter required default choices comments
content
no
When used instead of 'src', sets the contents of an iRule directly to the specified value. This is for simple values, but can be used with lookup plugins for anything complex or with formatting. Either one of src or content must be provided.
module
yes
  • ltm
  • gtm
The BIG-IP module to add the iRule to.
name
yes
The name of the iRule.
partition
no Common
The partition to create the iRule on.
password
yes
The password for the user account used to connect to the BIG-IP.
server
yes
The BIG-IP host.
server_port
(added in 2.2)
no 443
The BIG-IP server port.
src
yes
The iRule file to interpret and upload to the BIG-IP. Either one of src or content must be provided.
state
no present
  • present
  • absent
Whether the iRule should exist or not.
user
yes
The username to connect to the BIG-IP with. This user must have administrative privileges on the device.
validate_certs
(added in 2.0)
no True
  • True
  • False
If no, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.

Examples

- name: Add the iRule contained in templated irule.tcl to the LTM module
  bigip_irule:
      content: "{{ lookup('template', 'irule-template.tcl') }}"
      module: "ltm"
      name: "MyiRule"
      password: "secret"
      server: "lb.mydomain.com"
      state: "present"
      user: "admin"
  delegate_to: localhost

- name: Add the iRule contained in static file irule.tcl to the LTM module
  bigip_irule:
      module: "ltm"
      name: "MyiRule"
      password: "secret"
      server: "lb.mydomain.com"
      src: "irule-static.tcl"
      state: "present"
      user: "admin"
  delegate_to: localhost

Return Values

Common return values are documented here Common Return Values, the following are the fields unique to this module:

name description returned type sample
content The content of the iRule that was managed changed and success string when LB_FAILED { set wipHost [LB::server addr] }
src The filename that included the iRule source changed and success, when provided string /opt/src/irules/example1.tcl
partition The partition in which the iRule was managed changed and success string Common
name The name of the iRule that was managed changed and success string my-irule
module The module that the iRule was added to changed and success string gtm

Notes

Note

Requires the f5-sdk Python package on the host. This is as easy as pip install f5-sdk.

This is an Extras Module

For more information on what this means please read Extras Modules

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.

© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/bigip_irule_module.html