ansible / ansible.builtin / v2.8.18 / module / ce_info_center_log Manages information center log configuration on HUAWEI CloudEngine switches. | "added in version" 2.4 of ansible.builtin" Authors: QijunPan (@QijunPan) preview | supported by communityansible.builtin.ce_info_center_log (v2.8.18) — module
pip
Install with pip install ansible==2.8.18
Setting the Timestamp Format of Logs. Configuring the Device to Output Logs to the Log Buffer.
- name: CloudEngine info center log 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: "Setting the timestamp format of logs" ce_info_center_log: log_time_stamp: date_tenthsecond provider: "{{ cli }}" - name: "Enabled to output information to the log buffer" ce_info_center_log: log_buff_enable: true provider: "{{ cli }}" - name: "Set the maximum number of logs in the log buffer" ce_info_center_log: log_buff_size: 100 provider: "{{ cli }}" - name: "Set a rule for outputting logs to a channel" ce_info_center_log: module_name: aaa channel_id: 1 log_enable: true log_level: critical provider: "{{ cli }}"
state: choices: - present - absent default: present description: - Determines whether the config should be present or not on the device. log_level: choices: - emergencies - alert - critical - error - warning - notification - informational - debugging description: - Specifies a log severity. channel_id: description: - Specifies a channel ID. The value is an integer ranging from 0 to 9. log_enable: choices: - no_use - 'true' - 'false' default: no_use description: - Indicates whether log filtering is enabled. module_name: description: - Specifies the name of a module. The value is a module name in registration logs. log_buff_size: description: - Specifies the maximum number of logs in the log buffer. The value is an integer that ranges from 0 to 10240. If logbuffer-size is 0, logs are not displayed. log_time_stamp: choices: - date_boot - date_second - date_tenthsecond - date_millisecond - shortdate_second - shortdate_tenthsecond - shortdate_millisecond - formatdate_second - formatdate_tenthsecond - formatdate_millisecond description: - Sets the timestamp format of logs. log_buff_enable: choices: - no_use - 'true' - 'false' default: no_use description: - Enables the Switch to send logs to the log buffer.
changed: description: check to see if a change was made on the device returned: always sample: true type: bool end_state: description: k/v pairs of configuration after module execution returned: verbose mode sample: log_time_stamp: date_tenthsecond type: dict existing: description: k/v pairs of existing configuration returned: verbose mode sample: log_time_stamp: date_second type: dict proposed: description: k/v pairs of parameters passed into module returned: verbose mode sample: log_time_stamp: date_tenthsecond state: present type: dict updates: description: commands sent to the device returned: always sample: - info-center timestamp log date precision-time tenth-second type: list