f5networks.f5_modules.bigip_iapp_service (1.28.0) — module

Manages TCL iApp services on a BIG-IP

| "added in version" 1.0.0 of f5networks.f5_modules"

Authors: Tim Rupp (@caphrim007), Wojciech Wypior (@wojtek0806)

Install collection

Install with ansible-galaxy collection install f5networks.f5_modules:==1.28.0


Add to requirements.yml

  collections:
    - name: f5networks.f5_modules
      version: 1.28.0

Description

Manages TCL iApp services on a BIG-IP.

The API the system uses to communicate with on the BIG-IP is C(/mgmt/tm/sys/application/service/).

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create HTTP iApp service from iApp template
  bigip_iapp_service:
    name: foo-service
    template: f5.http
    parameters: "{{ lookup('file', 'f5.http.parameters.json') }}"
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure a service using parameters in YAML
  bigip_iapp_service:
    name: tests
    template: web_frontends
    state: present
    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
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Re-configure a service whose underlying iApp was updated in place
  bigip_iapp_service:
    name: tests
    template: web_frontends
    force: true
    state: present
    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
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Try to remove the iApp template before the associated Service is removed
  bigip_iapp_template:
    name: web_frontends
    state: absent
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  register: result
  failed_when:
    - result is not success
    - "'referenced by one or more applications' not in result.msg"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure a service using more complicated parameters
  bigip_iapp_service:
    name: tests
    template: web_frontends
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
    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
      lists:
        - name: irules__irules
          value:
            - foo
            - bar
      tables:
        - name: basic__snatpool_members
        - name: net__snatpool_members
        - name: optimizations__hosts
        - name: pool__hosts
          columnNames:
            - name
          rows:
            - row:
                - internal.company.bar
        - name: pool__members
          columnNames:
            - addr
            - port
            - connection_limit
          rows:
            - row:
                - "none"
                - 80
                - 0
        - name: server_pools__servers
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Override metadata that may or may not exist in parameters
  bigip_iapp_service:
    name: foo-service
    template: f5.http
    parameters: "{{ lookup('file', 'f5.http.parameters.json') }}"
    metadata:
      - persist: true
        name: data 1
      - persist: true
        name: data 2
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

Inputs

    
name:
    description:
    - The name of the iApp service you want to deploy.
    required: true
    type: str

force:
    default: false
    description:
    - 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.
    type: bool

state:
    choices:
    - present
    - absent
    default: present
    description:
    - When C(present), ensures the iApp service is created and running. When C(absent),
      ensures the iApp service has been removed.
    type: str

metadata:
    description:
    - Metadata associated with the iApp service.
    - If this option is specified in the Ansible task, it takes precedence over any similar
      setting in the iApp Service payload that you provide in the C(parameters) field.
    elements: raw
    type: list

provider:
    description:
    - A dict object containing connection details.
    suboptions:
      auth_provider:
        description:
        - Configures the auth provider for to obtain authentication tokens from the remote
          device.
        - This option is really used when working with BIG-IQ devices.
        type: str
      no_f5_teem:
        default: false
        description:
        - If C(yes), TEEM telemetry data is not sent to F5.
        - You may omit this option by setting the environment variable C(F5_TELEMETRY_OFF).
        - Previously used variable C(F5_TEEM) is deprecated as its name was confusing.
        type: bool
      password:
        aliases:
        - pass
        - pwd
        description:
        - The password for the user account used to connect to the BIG-IP or the BIG-IQ.
        - You may omit this option by setting the environment variable C(F5_PASSWORD).
        required: true
        type: str
      server:
        description:
        - The BIG-IP host or the BIG-IQ host.
        - You may omit this option by setting the environment variable C(F5_SERVER).
        required: true
        type: str
      server_port:
        default: 443
        description:
        - The BIG-IP server port.
        - You may omit this option by setting the environment variable C(F5_SERVER_PORT).
        type: int
      timeout:
        description:
        - Specifies the timeout in seconds for communicating with the network device for
          either connecting or sending commands.  If the timeout is exceeded before the
          operation is completed, the module will error.
        type: int
      transport:
        choices:
        - rest
        default: rest
        description:
        - Configures the transport connection to use when connecting to the remote device.
        type: str
      user:
        description:
        - The username to connect to the BIG-IP or the BIG-IQ. This user must have administrative
          privileges on the device.
        - You may omit this option by setting the environment variable C(F5_USER).
        required: true
        type: str
      validate_certs:
        default: true
        description:
        - If C(no), SSL certificates are not validated. Use this only on personally controlled
          sites using self-signed certificates.
        - You may omit this option by setting the environment variable C(F5_VALIDATE_CERTS).
        type: bool
    type: dict
    version_added: 1.0.0
    version_added_collection: f5networks.f5_modules

template:
    description:
    - 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.
    - When creating a new service, this parameter is required.
    type: str

partition:
    default: Common
    description:
    - Device partition to manage resources on.
    type: str

parameters:
    description:
    - A hash of all the required template variables for the iApp template. If your parameters
      are stored in a file (the more common scenario) we recommend you use either the
      C(file) or C(template) lookups to supply the expected parameters.
    - These parameters typically consist of the C(lists), C(tables), and C(variables)
      fields.
    type: dict

description:
    description:
    - Description of the iApp service.
    - If this option is specified in the Ansible task, it takes precedence over any similar
      setting in the iApp Service payload that you provide in the C(parameters) field.
    type: str

device_group:
    description:
    - The device group for the iApp service.
    - If this option is specified in the Ansible task, it takes precedence over any similar
      setting in the iApp Service payload that you provide in the C(parameters) field.
    type: str

traffic_group:
    description:
    - The traffic group for the iApp service. When creating a new service, if this value
      is not specified, the default of C(/Common/traffic-group-1) is used.
    - If this option is specified in the Ansible task, it takes precedence over any similar
      setting in the iApp Service payload that you provide in the C(parameters) field.
    type: str

strict_updates:
    description:
    - Indicates whether the application service is tied to the template, so when the template
      is updated, the application service changes to reflect the updates.
    - When C(true), disallows any updates to the resources that the iApp service has created,
      if they are not updated directly through the iApp.
    - When C(false), allows updates outside of the iApp.
    - If this option is specified in the Ansible task, it takes precedence over any similar
      setting in the iApp Service payload that you provide in the C(parameters) field.
    type: bool