W3cubDocs

/Ansible

bigip_iapp_service - Manages TCL iApp services on a BIG-IP.

New in version 2.4.

Synopsis

  • Manages TCL iApp services on a BIG-IP.

Requirements (on host that executes module)

  • f5-sdk
  • deepdiff

Options

parameter required default choices comments
force
no
Forces the updating of an iApp service even if the parameters to the service have not changed. This option is of particular importance if the iApp template that underlies the service has been updated in-place. This option is equivalent to re-configuring the iApp if that template has changed.
name
yes
The name of the iApp service that you want to deploy.
parameters
no
A hash of all the required template variables for the iApp template. If your parameters are stored in a file (the more common scenario) it is recommended you use either the `file` or `template` lookups to supply the expected parameters.
password
yes
The password for the user account used to connect to the BIG-IP. This option can be omitted if the environment variable F5_PASSWORD is set.
server
yes
The BIG-IP host. This option can be omitted if the environment variable F5_SERVER is set.
server_port
(added in 2.2)
no 443
The BIG-IP server port. This option can be omitted if the environment variable F5_SERVER_PORT is set.
state
no present
  • present
  • absent
When present, ensures that the iApp service is created and running. When absent, ensures that the iApp service has been removed.
template
no
The iApp template from which to instantiate a new service. This template must exist on your BIG-IP before you can successfully create a service. This parameter is required if the state parameter is present.
user
yes
The username to connect to the BIG-IP with. This user must have administrative privileges on the device. This option can be omitted if the environment variable F5_USER is set.
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. This option can be omitted if the environment variable F5_VALIDATE_CERTS is set.

Examples

- name: Create HTTP iApp service from iApp template
  bigip_iapp_service:
      name: "foo-service"
      template: "f5.http"
      parameters: "{{ lookup('file', 'f5.http.parameters.json') }}"
      password: "secret"
      server: "lb.mydomain.com"
      state: "present"
      user: "admin"
  delegate_to: localhost

- name: Upgrade foo-service to v1.2.0rc4 of the f5.http template
  bigip_iapp_service:
      name: "foo-service"
      template: "f5.http.v1.2.0rc4"
      password: "secret"
      server: "lb.mydomain.com"
      state: "present"
      user: "admin"
  delegate_to: localhost

- name: Configure a service using parameters in YAML
  bigip_iapp_service:
      name: "tests"
      template: "web_frontends"
      password: "admin"
      server: "{{ inventory_hostname }}"
      server_port: "{{ bigip_port }}"
      validate_certs: "{{ validate_certs }}"
      state: "present"
      user: "admin"
      parameters:
          variables:
              - name: "var__vs_address"
                value: "1.1.1.1"
              - name: "pm__apache_servers_for_http"
                value: "2.2.2.1:80"
              - name: "pm__apache_servers_for_https"
                value: "2.2.2.2:80"
  delegate_to: localhost

- name: Re-configure a service whose underlying iApp was updated in place
  bigip_iapp_service:
      name: "tests"
      template: "web_frontends"
      password: "admin"
      force: yes
      server: "{{ inventory_hostname }}"
      server_port: "{{ bigip_port }}"
      validate_certs: "{{ validate_certs }}"
      state: "present"
      user: "admin"
      parameters:
          variables:
              - name: "var__vs_address"
                value: "1.1.1.1"
              - name: "pm__apache_servers_for_http"
                value: "2.2.2.1:80"
              - name: "pm__apache_servers_for_https"
                value: "2.2.2.2:80"
  delegate_to: localhost

Notes

Note

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

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

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

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