bigip_snmp_trap - Manipulate SNMP trap information on a BIG-IP.
New in version 2.4.
Synopsis
- Manipulate SNMP trap information on a BIG-IP.
Requirements (on host that executes module)
- f5-sdk >= 2.2.0
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
community | no | Specifies the community name for the trap destination. | ||
destination | no | Specifies the address for the trap destination. This can be either an IP address or a hostname. | ||
name | yes | Name of the SNMP configuration endpoint. | ||
network | no |
| Specifies the name of the trap network. This option is not supported in versions of BIG-IP < 12.1.0. If used on versions < 12.1.0, it will simply be ignored. | |
password | yes | The password for the user account used to connect to the BIG-IP. This option can be omitted if the environment variable F5_PASSWORD is set. | ||
port | no | Specifies the port for the trap destination. | ||
server | yes | The BIG-IP host. This option can be omitted if the environment variable F5_SERVER is set. | ||
server_port (added in 2.2)
| no | 443 | The BIG-IP server port. This option can be omitted if the environment variable F5_SERVER_PORT is set. | |
snmp_version | no |
| Specifies to which Simple Network Management Protocol (SNMP) version the trap destination applies. | |
state | no | present |
| When present , ensures that the cloud connector exists. When absent , ensures that the cloud connector does not exist. |
user | yes | The username to connect to the BIG-IP with. This user must have administrative privileges on the device. This option can be omitted if the environment variable F5_USER is set. | ||
validate_certs (added in 2.0)
| no | True |
| If no , SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. This option can be omitted if the environment variable F5_VALIDATE_CERTS is set. |
Examples
- name: Create snmp v1 trap bigip_snmp_trap: community: "general" destination: "1.2.3.4" name: "my-trap1" network: "management" port: "9000" snmp_version: "1" server: "lb.mydomain.com" user: "admin" password: "secret" delegate_to: localhost - name: Create snmp v2 trap bigip_snmp_trap: community: "general" destination: "5.6.7.8" name: "my-trap2" network: "default" port: "7000" snmp_version: "2c" server: "lb.mydomain.com" user: "admin" password: "secret" delegate_to: localhost
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
community | The new community name for the trap destination. | changed and success | list | secret |
destination | The new address for the trap destination in either IP or hostname form. | changed and success | string | 1.2.3.4 |
network | The new name of the network the SNMP trap is on. | changed and success | string | management |
port | The new port of the trap destination. | changed and success | string | 900 |
snmp_version | The new snmp_version configured on the remote device. | changed and success | string | 2c |
Notes
Note
- Requires the f5-sdk Python package on the host. This is as easy as pip install f5-sdk.
- This module only supports version v1 and v2c of SNMP.
- The
network
option is not supported on versions of BIG-IP < 12.1.0 because the platform did not support that option until 12.1.0. If used on versions < 12.1.0, it will simply be ignored.
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/bigip_snmp_trap_module.html