community.network.ce_info_center_global – Manages outputting logs on HUAWEI CloudEngine switches.¶
Note
This plugin is part of the community.network collection (version 2.1.1).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.ce_info_center_global
.
Synopsis¶
This module offers the ability to be output to the log buffer, log file, console, terminal, or log host on HUAWEI CloudEngine switches.
Parameters¶
Notes¶
Note
This module requires the netconf system service be enabled on the remote device being managed.
Recommended connection is
netconf
.This module also works with
local
connections for legacy playbooks.
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
community.network.ce_info_center_global:
info_center_enable: true
state: present
provider: "{{ cli }}"
- name: Config statistic-suppress enable
community.network.ce_info_center_global:
suppress_enable: true
state: present
provider: "{{ cli }}"
- name: Config info-center syslog packet-priority 1
community.network.ce_info_center_global:
packet_priority: 2
state: present
provider: "{{ cli }}"
- name: Config info-center channel 1 name aaa
community.network.ce_info_center_global:
channel_id: 1
channel_cfg_name: aaa
state: present
provider: "{{ cli }}"
- name: Config info-center logfile size 10
community.network.ce_info_center_global:
logfile_max_num: 10
state: present
provider: "{{ cli }}"
- name: Config info-center console channel 1
community.network.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
community.network.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
community.network.ce_info_center_global:
logfile_max_size: 16
state: present
provider: "{{ cli }}"
- name: Config syslog loghost domain.
community.network.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, the following are the fields unique to this module:
Authors¶
Li Yanfeng (@QijunPan)