On this page
bigip_pool_member - Manages F5 BIG-IP LTM pool members
New in version 1.4.
Synopsis
- Manages F5 BIG-IP LTM pool members via iControl SOAP API.
 
Requirements
The below requirements are needed on the host that executes this module.
- f5-sdk >= 3.0.9
 
Parameters
| Parameter | Choices/Defaults | Comments | |
|---|---|---|---|
| address  
        (added in 2.2)
         | 
      
        
        IP address of the pool member. This can be either IPv4 or IPv6. When creating a new pool member, one of either  
       address or fqdn must be provided. This parameter cannot be updated after it is set.
       aliases: ip, host  | 
     ||
| connection_limit | 
        
        Pool member connection limit. Setting this to 0 disables the limit.
         | 
     ||
| description | 
        
        Pool member description.
         | 
     ||
| fqdn  
        (added in 2.6)
         | 
      
        
        FQDN name of the pool member. This can be any name that is a valid RFC 1123 DNS name. Therefore, the only characters that can be used are "A" to "Z", "a" to "z", "0" to "9", the hyphen ("-") and the period (".").
        
       
        FQDN names must include at lease one period; delineating the host from the domain. ex.  
       host.domain.
       
        FQDN names must end with a letter or a number.
        
       
        When creating a new pool member, one of either  
       address or fqdn must be provided. This parameter cannot be updated after it is set.
       aliases: hostname  | 
     ||
| fqdn_auto_populate  
        bool
         
        (added in 2.6)
         | 
      
       
  | 
      
        
        Specifies whether the system automatically creates ephemeral nodes using the IP addresses returned by the resolution of a DNS query for a node defined by an FQDN.
        
       
        When  
       enabled, the system generates an ephemeral node for each IP address returned in response to a DNS query for the FQDN of the node. Additionally, when a DNS response indicates the IP address of an ephemeral node no longer exists, the system deletes the ephemeral node.
       
        When  
       disabled, the system resolves a DNS query for the FQDN of the node with the single IP address associated with the FQDN.
       
        When creating a new pool member, the default for this parameter is  
       yes.
       
        This parameter is ignored when  reuse_nodes is yes.
        | 
     |
| monitor_state  
        (added in 2.0)
         | 
      
       
  | 
      
        
        Set monitor availability status for pool member.
        
       
        This parameter is deprecated and will be removed in Ansible 2.7. Use  state enabled or disabled.
        | 
     |
| name  
        (added in 2.6)
         | 
      
        
        Name of the node to create, or re-use, when creating a new pool member.
        
       
        This parameter is optional and, if not specified, a node name will be created automatically from either the specified  address or fqdn.
        | 
     ||
| partition | Default: 
        "Common"
         | 
      
        
        Partition
         | 
     |
| 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  | 
     ||
| pool  
        required
         | 
      
        
        Pool name. This pool must exist.
         | 
     ||
| port  
        required
         | 
      
        
        Pool member port.
        
       
        This value cannot be changed after it has been set.
         | 
     ||
| preserve_node  
        bool
         
        (added in 2.1)
         | 
      
       
  | 
      
        
        When state is  
       absent attempts to remove the node that the pool member references.
       
        The node will not be removed if it is still referenced by other pool members. If this happens, the module will not raise an error.
        
       
        Setting this to  yes disables this behavior.
        | 
     |
| priority_group  
        (added in 2.5)
         | 
      
        
        Specifies a number representing the priority group for the pool member.
        
       
        When adding a new member, the default is 0, meaning that the member has no priority.
        
       
        To specify a priority, you must activate priority group usage when you create a new pool or when adding or removing pool members. When activated, the system load balances traffic according to the priority group number assigned to the pool member.
        
       
        The higher the number, the higher the priority, so a member with a priority of 3 has higher priority than a member with a priority of 1.
         | 
     ||
| 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.
         | 
     |
| rate_limit | 
        
        Pool member rate limit (connections-per-second). Setting this to 0 disables the limit.
         | 
     ||
| ratio | 
        
        Pool member ratio weight. Valid values range from 1 through 100. New pool members -- unless overridden with this value -- default to 1.
         | 
     ||
| reuse_nodes  
        bool
         
        (added in 2.6)
         | 
      
       
  | 
      
        
        Reuses node definitions if requested.
         | 
     |
| 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.
        | 
     |
| session_state  
        (added in 2.0)
         | 
      
       
  | 
      
        
        Set new session availability status for pool member.
        
       
        This parameter is deprecated and will be removed in Ansible 2.7. Use  state enabled or disabled.
        | 
     |
| state  
        required
         | 
      
       
  | 
      
        
        Pool member state.
         | 
     |
| 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: Add pool member
  bigip_pool_member:
    server: lb.mydomain.com
    user: admin
    password: secret
    state: present
    pool: my-pool
    partition: Common
    host: "{{ ansible_default_ipv4['address'] }}"
    port: 80
    description: web server
    connection_limit: 100
    rate_limit: 50
    ratio: 2
  delegate_to: localhost
- name: Modify pool member ratio and description
  bigip_pool_member:
    server: lb.mydomain.com
    user: admin
    password: secret
    state: present
    pool: my-pool
    partition: Common
    host: "{{ ansible_default_ipv4['address'] }}"
    port: 80
    ratio: 1
    description: nginx server
  delegate_to: localhost
- name: Remove pool member from pool
  bigip_pool_member:
    server: lb.mydomain.com
    user: admin
    password: secret
    state: absent
    pool: my-pool
    partition: Common
    host: "{{ ansible_default_ipv4['address'] }}"
    port: 80
  delegate_to: localhost
- name: Force pool member offline
  bigip_pool_member:
    server: lb.mydomain.com
    user: admin
    password: secret
    state: forced_offline
    pool: my-pool
    partition: Common
    host: "{{ ansible_default_ipv4['address'] }}"
    port: 80
  delegate_to: localhost
- name: Create members with priority groups
  bigip_pool_member:
    server: lb.mydomain.com
    user: admin
    password: secret
    pool: my-pool
    partition: Common
    host: "{{ item.address }}"
    name: "{{ item.name }}"
    priority_group: "{{ item.priority_group }}"
    port: 80
  delegate_to: localhost
  loop:
    - host: 1.1.1.1
      name: web1
      priority_group: 4
    - host: 2.2.2.2
      name: web2
      priority_group: 3
    - host: 3.3.3.3
      name: web3
      priority_group: 2
    - host: 4.4.4.4
      name: web4
      priority_group: 1
  Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | 
|---|---|---|
| address  
        string
         | 
      changed | 
        
        The address of the pool member.
         Sample:
        
       
        1.2.3.4
         | 
     
| connection_limit  
        int
         | 
      changed | 
        
        The new connection limit of the pool member
         Sample:
        
       
        1000
         | 
     
| description  
        string
         | 
      changed | 
        
        The new description of pool member.
         Sample:
        
       
        My pool member
         | 
     
| fqdn  
        string
         | 
      changed | 
        
        The FQDN of the pool member.
         Sample:
        
       
        foo.bar.com
         | 
     
| fqdn_auto_populate  
        bool
         | 
      changed | 
        
        Whether FQDN auto population was set on the member or not.
         Sample:
        
       
        True
         | 
     
| priority_group  
        int
         | 
      changed | 
        
        The new priority group.
         Sample:
        
       
        3
         | 
     
| rate_limit  
        int
         | 
      changed | 
        
        The new rate limit, in connections per second, of the pool member.
         Sample:
        
       
        100
         | 
     
| ratio  
        int
         | 
      changed | 
        
        The new pool member ratio weight.
         Sample:
        
       
        50
         | 
     
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
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_pool_member_module.html