scale_computing.hypercore.syslog_server module – Create, update or delete Syslog servers from HyperCore API.
Note
This module is part of the scale_computing.hypercore collection (version 1.6.0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install scale_computing.hypercore
.
To use it in a playbook, specify: scale_computing.hypercore.syslog_server
.
New in scale_computing.hypercore 1.2.0
Synopsis
Use this module to create, update or delete Syslog servers from the Syslog Servers configuration on HyperCore API.
A single syslog server can be created/updated/removed using state=present/absent and
host
,port
,protocol
. In this case, return valuerecord
is set, but return valuerecords
is empty list.All syslog servers can be reconfigured at once using state=set and
syslog_servers
.syslog_servers
is a list withhost
,port
,protocol
attributes. In this case, return valuerecord
is empty dict, and return valuerecords
lists configured servers.
Parameters
Parameter |
Comments |
---|---|
Scale Computing HyperCore instance information. |
|
Select login method. If not set, the value of the Value local - username/password is verified by the HyperCore server (the local users). Value oidc - username/password is verified by the configured OIDC provider. Choices:
|
|
The HyperCore instance URL. If not set, the value of the For example “https://10.1.2.3:443”. |
|
Password used for authentication. If not set, the value of the |
|
Timeout in seconds for the connection with the Scale Computing HyperCore API instance. If not set, the value of the |
|
Username used for authentication. If not set, the value of the |
|
An IP address or hostname of the Syslog server you wish to create, update or delete. |
|
An IP address or hostname with which the existing Syslog server host on the HyperCore API will be updated. |
|
Network port of the syslog server. Default: |
|
Network protocol used to send syslog alerts. Choices:
|
|
The desired state of the syslog server on HyperCore API. If state=present a new Syslog server will be added, or existing Syslog server with matching
If state=absent, the Syslog server with the provided If state=set, then Choices:
|
|
List of syslog servers to set. Default: |
|
An IP address or hostname of the Syslog server you wish to create, update or delete. |
|
Network port of the syslog server. Default: |
|
Network protocol used to send syslog alerts. Choices:
|
Notes
Note
check_mode
is not supported.
See Also
See also
- scale_computing.hypercore.syslog_server_info
List Syslog servers on HyperCore API.
Examples
- name: Set all Syslog servers - this removes everything not listed in syslog_servers
scale_computing.hypercore.syslog_server:
syslog_servers:
- host: 10.5.11.222
port: 514
protocol: udp
- host: 10.5.11.223
port: 10514
protocol: tcp
state: set
- name: Create a single Syslog server - leaves other Syslog servers unmodifed
scale_computing.hypercore.syslog_server:
host: 10.5.11.222
port: 514
protocol: udp
state: present
- name: Update a single existing Syslog server - leaves other Syslog servers unmodifed
scale_computing.hypercore.syslog_server:
host: 10.5.11.222
host_new: 1.2.3.4
port: 514
protocol: udp
state: present
- name: Delete a single Syslog server - leaves other Syslog servers unmodifed
scale_computing.hypercore.syslog_server:
host: 10.5.11.222
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Created or updated syslog server. Returned: success |
|
Unique identifier for an AlertTag (internal) Returned: success Sample: |
|
IP address or hostname of the syslog server Returned: success Sample: |
|
Latest Task Tag Returned: success Sample: |
|
Network port of the syslog server Returned: success Sample: |
|
Network protocol used to send syslog alerts Returned: success Sample: |
|
Alert resend delay in seconds Returned: success Sample: |
|
Alerts will not resend if there are additional event triggers within this time in seconds Returned: success Sample: |
|
Unique identifer Returned: success Sample: |
|
List of syslog servers Returned: success |