ce_info_center_global - Manages outputting logs on HUAWEI CloudEngine switches.
New in version 2.4.
Synopsis
- This module offers the ability to be output to the log buffer, log file, console, terminal, or log host on HUAWEI CloudEngine switches.
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
channel_cfg_name | no | console | Channel name.The value is a string of 1 to 30 case-sensitive characters. The default value is console. | |
channel_id | no | Number for channel. The value is an integer ranging from 0 to 9. The default value is 0. | ||
channel_name | no | Channel name. The value is a string of 1 to 30 case-sensitive characters. | ||
channel_out_direct | no |
| Direction of information output. | |
facility | no |
| Log record tool. | |
filter_feature_name | no | Feature name of the filtered log. The value is a string of 1 to 31 case-insensitive characters. | ||
filter_log_name | no | Name of the filtered log. The value is a string of 1 to 63 case-sensitive characters. | ||
info_center_enable | no |
| Whether the info-center function is enabled. The value is of the Boolean type. | |
ip_type | no |
| Log server address type, IPv4 or IPv6. | |
is_default_vpn | no | Use the default VPN or not. | ||
level | no |
| Level of logs saved on a log server. | |
logfile_max_num | no | Maximum number of log files of the same type. The default value is 200. The value range for log files is[3, 500], for security files is [1, 3],and for operation files is [1, 7]. | ||
logfile_max_size | no | 32 |
| Maximum size (in MB) of a log file. The default value is 32. The value range for log files is [4, 8, 16, 32], for security files is [1, 4], and for operation files is [1, 4]. |
packet_priority | no | Set the priority of the syslog packet.The value is an integer ranging from 0 to 7. The default value is 0. | ||
server_domain | no | Server name. The value is a string of 1 to 255 case-sensitive characters. | ||
server_ip | no | Log server address, IPv4 or IPv6 type. The value is a string of 0 to 255 characters. The value can be an valid IPv4 or IPv6 address. | ||
server_port | no | Number of a port sending logs.The value is an integer ranging from 1 to 65535. For UDP, the default value is 514. For TCP, the default value is 601. For TSL, the default value is 6514. | ||
source_ip | no | Log source ip address, IPv4 or IPv6 type. The value is a string of 0 to 255. The value can be an valid IPv4 or IPv6 address. | ||
ssl_policy_name | no | SSL policy name. The value is a string of 1 to 23 case-sensitive characters. | ||
state | no | present |
| Specify desired state of the resource. |
suppress_enable | no |
| Whether a device is enabled to suppress duplicate statistics. The value is of the Boolean type. | |
timestamp | no |
| Log server timestamp. The value is of the enumerated type and case-sensitive. | |
transport_mode | no |
| Transport mode. The value is of the enumerated type and case-sensitive. | |
vrf_name | no | VPN name on a log server. The value is a string of 1 to 31 case-sensitive characters. The default value is _public_. |
Examples
- name: info center global module test hosts: cloudengine connection: local gather_facts: no vars: cli: host: "{{ inventory_hostname }}" port: "{{ ansible_ssh_port }}" username: "{{ username }}" password: "{{ password }}" transport: cli tasks: - name: Config info-center enable ce_info_center_global: info_center_enable: true state: present provider: "{{ cli }}" - name: Config statistic-suppress enable ce_info_center_global: suppress_enable: true state: present provider: "{{ cli }}" - name: Config info-center syslog packet-priority 1 ce_info_center_global: packet_priority: 2 state: present provider: "{{ cli }}" - name: Config info-center channel 1 name aaa ce_info_center_global: channel_id: 1 channel_cfg_name: aaa state: present provider: "{{ cli }}" - name: Config info-center logfile size 10 ce_info_center_global: logfile_max_num: 10 state: present provider: "{{ cli }}" - name: Config info-center console channel 1 ce_info_center_global: channel_out_direct: console channel_id: 1 state: present provider: "{{ cli }}" - name: Config info-center filter-id bymodule-alias snmp snmp_ipunlock ce_info_center_global: filter_feature_name: SNMP filter_log_name: SNMP_IPLOCK state: present provider: "{{ cli }}" - name: Config info-center max-logfile-number 16 ce_info_center_global: logfile_max_size: 16 state: present provider: "{{ cli }}" - name: Config syslog loghost domain. ce_info_center_global: server_domain: aaa vrf_name: aaa channel_id: 1 transport_mode: tcp facility: local4 server_port: 100 level: alert timestamp: UTC state: present provider: "{{ cli }}"
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
changed | check to see if a change was made on the device | always | boolean | True |
end_state | k/v pairs of aaa params after module execution | always | dict | {'server_domain_info': [{'vrfName': '_public_', 'chnlName': 'monitor', 'level': 'alert', 'serverDomain': 'aaa', 'transportMode': 'tcp', 'facility': 'local4', 'isBriefFmt': 'false', 'sslPolicyName': None, 'serverPort': '100', 'timestamp': 'localtime', 'isDefaultVpn': 'true', 'chnlId': '1', 'sourceIP': '0.0.0.0'}, {'vrfName': 'aaa', 'chnlName': 'monitor', 'level': 'alert', 'serverDomain': 'aaa', 'transportMode': 'tcp', 'facility': 'local4', 'isBriefFmt': 'false', 'sslPolicyName': 'gmc', 'serverPort': '100', 'timestamp': 'UTC', 'isDefaultVpn': 'false', 'chnlId': '1', 'sourceIP': '0.0.0.0'}]} |
existing | k/v pairs of existing rollback | always | dict | {'server_domain_info': [{'vrfName': 'aaa', 'chnlName': 'monitor', 'level': 'alert', 'serverDomain': 'aaa', 'transportMode': 'tcp', 'facility': 'local4', 'isBriefFmt': 'false', 'sslPolicyName': 'gmc', 'serverPort': '100', 'timestamp': 'UTC', 'isDefaultVpn': 'false', 'chnlId': '1', 'sourceIP': '0.0.0.0'}]} |
proposed | k/v pairs of parameters passed into module | always | dict | {'server_domain': 'aaa', 'level': 'alert', 'timestamp': 'localtime', 'facility': 'local4', 'channel_id': '1', 'state': 'present', 'server_port': '100', 'transport_mode': 'tcp', 'is_default_vpn': True} |
updates | command sent to the device | always | list | ['info-center loghost domain aaa level alert port 100 facility local4 channel 1 localtime transport tcp'] |
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/ce_info_center_global_module.html