New in version 2.4.
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. |
- 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
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
snmp_version | The new snmp_version configured on the remote device. | changed and success | string | 2c |
destination | The new address for the trap destination in either IP or hostname form. | changed and success | string | 1.2.3.4 |
port | The new port of the trap destination. | changed and success | string | 900 |
community | The new community name for the trap destination. | changed and success | list | secret |
network | The new name of the network the SNMP trap is on. | changed and success | string | management |
Note
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.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–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/bigip_snmp_trap_module.html