- AnsibleFest
- Products
- Community
- Webinars & Training
- Blog

Documentation

# bigip_message_routing_peer – Manage peers for routing generic message protocol messages

New in version 2.9.

- Synopsis

- Parameters

- Notes

- Examples

- Return Values

- Status

## Synopsis

- Manage peers for routing generic message protocol messages.

## Parameters

Parameter | Choices/Defaults | Comments
--- | --- | ---
auto_init boolean | Choices: no yes | If `yes`, the BIGIP will automatically create outbound connections to the active pool members in the specified `pool` using the configuration of the specified `transport_config`. For auto-initialization to attempt to create a connection, the peer must be included in a route that is attached to a router instance. For each router instance that the peer is contained in, a connection will be initiated. The `auto_init` logic will verify at `auto_init_interval` if the a connection exists between the BIG-IP and the pool members of the pool. If a connection does not exist, it will attempt to reestablish one.
auto_init_interval integer |  | Specifies the interval that attempts to initiate a connection occur. The default value upon peer object creation, that supplied by the system is `5000` milliseconds. The accepted range is between 0 and 4294967295 inclusive.
connection_mode string | Choices: per-blade per-client per-peer per-tmm | Specifies how the number of connections per host are to be limited.
description string |  | The user defined description of the peer.
name string / required |  | Specifies the name of the peer to manage.
number_of_connections integer |  | Specifies the distribution of connections between the BIG-IP and a remote host. The accepted range is between 0 and 65535 inclusive.
partition string | Default: "Common" | Device partition to create peer object on.
pool string |  | Specifies the name of the pool that messages will be routed towards. The specified pool must be on the same partition as the peer.
provider dictionary added in 2.5 |  | A dict object containing connection details.
| auth_provider string |  | Configures the auth provider for to obtain authentication tokens from the remote device. This option is really used when working with BIG-IQ devices.
| password string / required |  | The password for the user account used to connect to the BIG-IP. You may omit this option by setting the environment variable `F5_PASSWORD`. aliases: pass, pwd
| server string / required |  | The BIG-IP host. You may omit this option by setting the environment variable `F5_SERVER`.
| server_port integer | Default: 443 | The BIG-IP server port. You may omit this option by setting the environment variable `F5_SERVER_PORT`.
| ssh_keyfile path |  | Specifies the SSH keyfile to use to authenticate the connection to the remote device. This argument is only used for cli transports. You may omit this option by setting the environment variable `ANSIBLE_NET_SSH_KEYFILE`.
| timeout integer |  | 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.
| transport string | Choices: cli rest ← | Configures the transport connection to use when connecting to the remote device.
| user string / required |  | The username to connect to the BIG-IP with. This user must have administrative privileges on the device. You may omit this option by setting the environment variable `F5_USER`.
| validate_certs boolean | Choices: no yes ← | If `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 `F5_VALIDATE_CERTS`.
ratio integer |  | Specifies the ratio to be used for selection of a peer within a list of peers in a ltm route. The accepted range is between 0 and 4294967295 inclusive.
state string | Choices: present ← absent | When `present`, ensures that the peer exists. When `absent`, ensures the peer is removed.
transport_config string |  | The name of the ltm virtual or ltm transport-config to use for creating an outgoing connection. The resource must exist on the same partition as the peer object.
type string | Choices: generic ← | Parameter used to specify the type of the peer to manage. Default setting is `generic` with more options added in future.

## Notes

Note

- Requires BIG-IP >= 14.0.0

- For more information on using Ansible to manage F5 Networks devices see https://www.ansible.com/integrations/networks/f5.

- Requires BIG-IP software version >= 12.

- The F5 modules only manipulate the running configuration of the F5 product. To ensure that BIG-IP specific configuration persists to disk, be sure to include at least one task that uses the bigip_config module to save the running configuration. Refer to the module’s documentation for the correct usage of the module to save your running configuration.

## Examples

    - name: Create a simple peer
      bigip_message_routing_peer:
        name: foobar
        provider:
          password: secret
          server: lb.mydomain.com
          user: admin
      delegate_to: localhost

    - name: Create message routing peer with additional settings
      bigip_message_routing_peer:
        name: foobar
        connection_mode: per-blade
        pool: /baz/bar
        partition: baz
        transport_config: foovirtual
        ratio: 10
        auto_init: yes
        provider:
          password: secret
          server: lb.mydomain.com
          user: admin
      delegate_to: localhost

    - name: Modify message routing peer settings
      bigip_message_routing_peer:
        name: foobar
        partition: baz
        ratio: 20
        auto_init_interval: 2000
        provider:
          password: secret
          server: lb.mydomain.com
          user: admin
      delegate_to: localhost

    - name: Remove message routing peer
      bigip_message_routing_peer:
        name: foobar
        partition: baz
        state: absent
        provider:
          password: secret
          server: lb.mydomain.com
          user: admin
      delegate_to: localhost

## Return Values

Common return values are documented here, the following are the fields unique to this module:

Key | Returned | Description
--- | --- | ---
auto_init boolean | changed | Enables creation of outbound connections to the active pool members. Sample: True
auto_init_interval integer | changed | The interval that attempts to initiate a connection occur. Sample: 2000
connection_mode string | changed | Specifies how the number of connections per host are to be limited. Sample: per-peer
description string | changed | The user defined description of the peer. Sample: Some description
number_of_connections integer | changed | The distribution of connections between the BIG-IP and a remote host. Sample: 2000
pool string | changed | The name of the pool that messages will be routed towards. Sample: /Bazbar/foobar
ratio integer | changed | The ratio to be used for selection of a peer within a list of peers in a ltm route. Sample: 500
transport_config string | changed | The ltm virtual or ltm transport-config to use for creating an outgoing connection. Sample: /Common/foobar

## Status

- This module is not guaranteed to have a backwards compatible interface. [preview]

- This module is maintained by an Ansible Partner. [certified]

### Authors

- Wojciech Wypior (@wojtek0806)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.