On this page
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.
 - If you are looking for the API that is communicated with on the BIG-IP, the one the is used is 
/mgmt/tm/sys/application/service/. There are a couple of APIs in a BIG-IP that might seem like they are relevant to iApp Services, but the API mentioned here is the one that is used. 
Requirements
The below requirements are needed on the host that executes this module.
- f5-sdk >= 3.0.9
 
Parameters
| Parameter | Choices/Defaults | Comments | |
|---|---|---|---|
| force  
        bool
         | 
      
       
  | 
      
        
        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  
        required
         | 
      
        
        The name of the iApp service that you want to deploy.
         | 
     ||
| parameters | 
        
        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.
        
       
        These parameters typically consist of the  lists, tables, and variables fields.
        | 
     ||
| partition  
        (added in 2.5)
         | 
      Default: 
        "Common"
         | 
      
        
        Device partition to manage resources on.
         | 
     |
| password  
        required
         | 
      
        
        The password for the user account used to connect to the BIG-IP. You can omit this option if the environment variable  
       F5_PASSWORD is set.
       aliases: pass, pwd  | 
     ||
| provider  
        (added in 2.5)
         | 
      
        
        A dict object containing connection details.
         | 
     ||
| password  
        required
         | 
      
        
        The password for the user account used to connect to the BIG-IP. You can omit this option if the environment variable  
       F5_PASSWORD is set.
       aliases: pass, pwd  | 
     ||
| server  
        required
         | 
      
        
        The BIG-IP host. You can omit this option if the environment variable  F5_SERVER is set.
        | 
     ||
| server_port | Default: 
        443
         | 
      
        
        The BIG-IP server port. You can omit this option if the environment variable  F5_SERVER_PORT is set.
        | 
     |
| user  
        required
         | 
      
        
        The username to connect to the BIG-IP with. This user must have administrative privileges on the device. You can omit this option if the environment variable  F5_USER is set.
        | 
     ||
| validate_certs  
        bool
         | 
      
       
  | 
      
        
        If  no, SSL certificates will not be validated. Use this only on personally controlled sites using self-signed certificates. You can omit this option if the environment variable F5_VALIDATE_CERTS is set.
        | 
     |
| timeout | Default: 
        10
         | 
      
        
        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.
         | 
     |
| ssh_keyfile | 
        
        Specifies the SSH keyfile to use to authenticate the connection to the remote device. This argument is only used for cli transports. If the value is not specified in the task, the value of environment variable  ANSIBLE_NET_SSH_KEYFILE will be used instead.
        | 
     ||
| transport  
        required
         | 
      
       
  | 
      
        
        Configures the transport connection to use when connecting to the remote device.
         | 
     |
| server  
        required
         | 
      
        
        The BIG-IP host. You can omit this option if the environment variable  F5_SERVER is set.
        | 
     ||
| server_port  
        (added in 2.2)
         | 
      Default: 
        443
         | 
      
        
        The BIG-IP server port. You can omit this option if the environment variable  F5_SERVER_PORT is set.
        | 
     |
| state | 
       
  | 
      
        
        When  present, ensures that the iApp service is created and running. When absent, ensures that the iApp service has been removed.
        | 
     |
| strict_updates  
        bool
         
        (added in 2.5)
         | 
      
       
  | 
      
        
        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  
       yes, disallows any updates to the resources that the iApp service has created, if they are not updated directly through the iApp.
       
        When  
       no, allows updates outside of the iApp.
       
        If this option is specified in the Ansible task, it will take precedence over any similar setting in the iApp Server payload that you provide in the  parameters field.
        | 
     |
| template | 
        
        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.
        | 
     ||
| traffic_group  
        (added in 2.5)
         | 
      
        
        The traffic group for the iApp service. When creating a new service, if this value is not specified, the default of  
       /Common/traffic-group-1 will be used.
       
        If this option is specified in the Ansible task, it will take precedence over any similar setting in the iApp Server payload that you provide in the  parameters field.
        | 
     ||
| user  
        required
         | 
      
        
        The username to connect to the BIG-IP with. This user must have administrative privileges on the device. You can omit this option if the environment variable  F5_USER is set.
        | 
     ||
| validate_certs  
        bool
         
        (added in 2.0)
         | 
      
       
  | 
      
        
        If  no, SSL certificates will not be validated. Use this only on personally controlled sites using self-signed certificates. You can omit this option if the environment variable F5_VALIDATE_CERTS is set.
        | 
     |
Notes
Note
- For more information on using Ansible to manage F5 Networks devices see https://www.ansible.com/integrations/networks/f5.
 - Requires the f5-sdk Python package on the host. This is as easy as 
pip install f5-sdk. 
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
- name: Try to remove the iApp template before the associated Service is removed
  bigip_iapp_template:
    name: web_frontends
    state: absent
  register: result
  failed_when:
    - result is not success
    - "'referenced by one or more applications' not in result.msg"
- name: Configure a service using more complicated parameters
  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
      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
  Status
This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.
Maintenance
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Author
- Tim Rupp (@caphrim007)
 
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
 https://docs.ansible.com/ansible/2.6/modules/bigip_iapp_service_module.html