f5networks / f5networks.f5_modules / 1.28.0 / module / bigip_pool_member Manages F5 BIG-IP LTM pool members | "added in version" 1.0.0 of f5networks.f5_modules" Authors: Tim Rupp (@caphrim007), Wojciech Wypior (@wojtek0806)f5networks.f5_modules.bigip_pool_member (1.28.0) — module
Install with ansible-galaxy collection install f5networks.f5_modules:==1.28.0
collections: - name: f5networks.f5_modules version: 1.28.0
Manages F5 BIG-IP LTM pool members via the REST API.
- name: Add pool member bigip_pool_member: pool: my-pool partition: Common name: my-member host: "{{ ansible_default_ipv4['address'] }}" port: 80 description: web server connection_limit: 100 rate_limit: 50 ratio: 2 provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
- name: Modify pool member ratio and description bigip_pool_member: pool: my-pool partition: Common name: my-member host: "{{ ansible_default_ipv4['address'] }}" port: 80 ratio: 1 description: nginx server provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
- name: Remove pool member from pool bigip_pool_member: state: absent pool: my-pool partition: Common name: my-member host: "{{ ansible_default_ipv4['address'] }}" port: 80 provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
- name: Force pool member offline bigip_pool_member: state: forced_offline pool: my-pool partition: Common name: my-member host: "{{ ansible_default_ipv4['address'] }}" port: 80 provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
- name: Create members with priority groups bigip_pool_member: pool: my-pool partition: Common host: "{{ item.address }}" name: "{{ item.name }}" priority_group: "{{ item.priority_group }}" port: 80 provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost loop: - address: 1.1.1.1 name: web1 priority_group: 4 - address: 2.2.2.2 name: web2 priority_group: 3 - address: 3.3.3.3 name: web3 priority_group: 2 - address: 4.4.4.4 name: web4 priority_group: 1
- name: Add pool members aggregate bigip_pool_member: pool: my-pool aggregate: - host: 192.168.1.1 partition: Common port: 80 description: web server connection_limit: 100 rate_limit: 50 ratio: 2 - host: 192.168.1.2 partition: Common port: 80 description: web server connection_limit: 100 rate_limit: 50 ratio: 2 - host: 192.168.1.3 partition: Common port: 80 description: web server connection_limit: 100 rate_limit: 50 ratio: 2 provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
- name: Add pool members aggregate, remove non aggregates bigip_pool_member: pool: my-pool aggregate: - host: 192.168.1.1 partition: Common port: 80 description: web server connection_limit: 100 rate_limit: 50 ratio: 2 - host: 192.168.1.2 partition: Common port: 80 description: web server connection_limit: 100 rate_limit: 50 ratio: 2 - host: 192.168.1.3 partition: Common port: 80 description: web server connection_limit: 100 rate_limit: 50 ratio: 2 replace_all_with: true provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
fqdn: aliases: - hostname description: - FQDN name of the pool member. This can be any name that is a valid RFC 1123 DNS name. Therefore, the only usable characters are "A" to "Z", "a" to "z", "0" to "9", the hyphen ("-") and the period ("."). - FQDN names must include at least one period; delineating the host from the domain. For example, C(host.domain). - FQDN names must end with a letter or a number. - When creating a new pool member, one of either C(address) or C(fqdn) must be provided. This parameter cannot be updated after it is set. type: str name: description: - Name of the node to create or re-use when creating a new pool member. - While this parameter is optional, we recommend specifying this parameter at all times to mitigate any unexpected behavior. - If not specified, a node name is created automatically from either the specified C(address) or C(fqdn). - The C(enabled) state is an alias of C(present). type: str pool: description: - Pool name. This pool must exist. required: true type: str port: description: - Pool member port. - This value cannot be changed after it has been set. - Parameter must be provided when using aggregates. type: int ratio: description: - Pool member ratio weight. Valid values range from 1 through 100. New pool members -- unless overridden with this value -- default to 1. type: int state: choices: - present - absent - enabled - disabled - forced_offline default: present description: - Pool member state. type: str address: aliases: - ip - host description: - IP address of the pool member. This can be either IPv4 or IPv6. When creating a new pool member, one of either C(address) or C(fqdn) must be provided. This parameter cannot be updated after it is set. type: str monitors: description: - Specifies the health monitors the system currently uses to monitor this resource. elements: str 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 aggregate: aliases: - members description: - List of pool member definitions to be created, modified, or removed. - When using C(aggregates), if one of the aggregate definitions is invalid, the aggregate run will fail, indicating the error it last encountered. - The module will B(NOT) rollback any changes it has made prior to encountering the error. - The module also will not indicate what changes were made prior to failure. Therefore we strong advise you run the module in C(check) mode to ensure basic validation prior to executing this module. elements: dict suboptions: address: aliases: - ip - host description: - IP address of the pool member. This can be either IPv4 or IPv6. When creating a new pool member, one of either C(address) or C(fqdn) must be provided. This parameter cannot be updated after it is set. type: str availability_requirements: description: - If you activate more than one health monitor, specifies the number of health monitors that must receive successful responses in order for the link to be considered available. - Specifying an empty string will remove the monitors and revert to inheriting from the pool (default). - Specifying C(none) will remove any health monitoring from the member completely. suboptions: at_least: description: - Specifies the minimum number of active health monitors that must be successful before the link is considered up. - This parameter is only relevant when a C(type) of C(at_least) is used. - This parameter will be ignored if a type of C(all) is used. type: int type: choices: - all - at_least description: - Monitor rule type when C(monitors) is specified. - When creating a new pool, if this value is not specified, the default of C(all) will be used. required: true type: str type: dict connection_limit: description: - Pool member connection limit. Setting this to C(0) disables the limit. type: int description: description: - Pool member description. type: str fqdn: aliases: - hostname description: - FQDN name of the pool member. This can be any name that is a valid RFC 1123 DNS name. Therefore, the only usable characters are "A" to "Z", "a" to "z", "0" to "9", the hyphen ("-") and the period ("."). - FQDN names must include at least one period; delineating the host from the domain. For example, C(host.domain). - FQDN names must end with a letter or a number. - When creating a new pool member, one of either C(address) or C(fqdn) must be provided. This parameter cannot be updated after it is set. type: str fqdn_auto_populate: description: - 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 C(true), 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 C(false), 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 C(true). - Once set this parameter cannot be changed afterwards. - This parameter is ignored when C(reuse_nodes) is C(true). type: bool ip_encapsulation: description: - Specifies the IP encapsulation using either IPIP (IP encapsulation within IP, RFC 2003) or GRE (Generic Router Encapsulation, RFC 2784) on outbound packets (from BIG-IP system to server-pool member). - When C(none), disables IP encapsulation. - When C(inherit), inherits the IP encapsulation setting from the member's pool. - When any other value, the options are None, Inherit from Pool, and Member Specific. type: str monitors: description: - Specifies the health monitors the system currently uses to monitor this resource. elements: str type: list name: description: - Name of the node to create or re-use when creating a new pool member. - While this parameter is optional, we recommend specifying this parameter at all times to mitigate any unexpected behavior. - If not specified, a node name is created automatically from either the specified C(address) or C(fqdn). - The C(enabled) state is an alias of C(present). type: str partition: default: Common description: - Partition to manage resources on. type: str port: description: - Pool member port. - This value cannot be changed after it has been set. - Parameter must be provided when using aggregates. type: int preserve_node: description: - When state is C(absent), the system attempts to remove the node 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 C(true) disables this behavior. type: bool priority_group: description: - Specifies a number representing the priority group for the pool member. - When adding a new member, the default is C(0), meaning 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. type: int rate_limit: description: - Pool member rate limit (connections-per-second). Setting this to C(0) disables the limit. type: int ratio: description: - Pool member ratio weight. Valid values range from 1 through 100. New pool members -- unless overridden with this value -- default to 1. type: int reuse_nodes: default: true description: - Reuses node definitions if requested. type: bool state: choices: - present - absent - enabled - disabled - forced_offline default: present description: - Pool member state. type: str type: list partition: default: Common description: - Partition to manage resources on. type: str rate_limit: description: - Pool member rate limit (connections-per-second). Setting this to C(0) disables the limit. type: int description: description: - Pool member description. type: str reuse_nodes: default: true description: - Reuses node definitions if requested. type: bool preserve_node: description: - When state is C(absent), the system attempts to remove the node 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 C(true) disables this behavior. type: bool priority_group: description: - Specifies a number representing the priority group for the pool member. - When adding a new member, the default is C(0), meaning 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. type: int connection_limit: description: - Pool member connection limit. Setting this to C(0) disables the limit. type: int ip_encapsulation: description: - Specifies the IP encapsulation using either IPIP (IP encapsulation within IP, RFC 2003) or GRE (Generic Router Encapsulation, RFC 2784) on outbound packets (from BIG-IP system to server-pool member). - When C(none), disables IP encapsulation. - When C(inherit), inherits the IP encapsulation setting from the member's pool. - When any other value, the options are None, Inherit from Pool, and Member Specific. type: str replace_all_with: aliases: - purge default: false description: - Removes members not defined in the C(aggregate) parameter. - This operation is all or none, meaning it will stop if there are some pool members that cannot be removed. type: bool fqdn_auto_populate: description: - 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 C(true), 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 C(false), 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 C(true). - Once set this parameter cannot be changed afterwards. - This parameter is ignored when C(reuse_nodes) is C(true). type: bool availability_requirements: description: - If you activate more than one health monitor, specifies the number of health monitors that must receive successful responses in order for the link to be considered available. - Specifying an empty string will remove the monitors and revert to inheriting from the pool (default). - Specifying C(none) will remove any health monitoring from the member completely. suboptions: at_least: description: - Specifies the minimum number of active health monitors that must be successful before the link is considered up. - This parameter is only relevant when a C(type) of C(at_least) is used. - This parameter will be ignored if a type of C(all) is used. type: int type: choices: - all - at_least description: - Monitor rule type when C(monitors) is specified. - When creating a new pool, if this value is not specified, the default of C(all) will be used. required: true type: str type: dict
address: description: The address of the pool member. returned: changed sample: 1.2.3.4 type: str connection_limit: description: The new connection limit of the pool member. returned: changed sample: 1000 type: int description: description: The new description of pool member. returned: changed sample: My pool member type: str fqdn: description: The FQDN of the pool member. returned: changed sample: foo.bar.com type: str fqdn_auto_populate: description: Whether FQDN auto population was set on the member or not. returned: changed sample: true type: bool monitors: description: The new list of monitors for the resource. returned: changed sample: - /Common/monitor1 - /Common/monitor2 type: list priority_group: description: The new priority group. returned: changed sample: 3 type: int rate_limit: description: The new rate limit, in connections per second, of the pool member. returned: changed sample: 100 type: int ratio: description: The new pool member ratio weight. returned: changed sample: 50 type: int replace_all_with: description: Purges all non-aggregate pool members from device. returned: changed sample: true type: bool