ce_info_center_log - Manages information center log configuration on HUAWEI CloudEngine switches.

New in version 2.4.

Synopsis

  • Setting the Timestamp Format of Logs. Configuring the Device to Output Logs to the Log Buffer.

Parameters

Parameter Choices/Defaults Comments
channel_id Default:
None
Specifies a channel ID. The value is an integer ranging from 0 to 9.
log_buff_enable
    Choices:
  • no_use
  • true
  • false
Enables the Switch to send logs to the log buffer.
log_buff_size Default:
None
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_enable
    Choices:
  • no_use
  • true
  • false
Indicates whether log filtering is enabled.
log_level
    Choices:
  • emergencies
  • alert
  • critical
  • error
  • warning
  • notification
  • informational
  • debugging
Default:
None
Specifies a log severity.
log_time_stamp
    Choices:
  • date_boot
  • date_second
  • date_tenthsecond
  • date_millisecond
  • shortdate_second
  • shortdate_tenthsecond
  • shortdate_millisecond
  • formatdate_second
  • formatdate_tenthsecond
  • formatdate_millisecond
Default:
None
Sets the timestamp format of logs.
module_name Default:
None
Specifies the name of a module. The value is a module name in registration logs.
state
    Choices:
  • present
  • absent
Determines whether the config should be present or not on the device.

Examples

- 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 }}"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
changed
boolean
always
check to see if a change was made on the device

Sample:
True
end_state
dict
verbose mode
k/v pairs of configuration after module execution

Sample:
{'log_time_stamp': 'date_tenthsecond'}
existing
dict
verbose mode
k/v pairs of existing configuration

Sample:
{'log_time_stamp': 'date_second'}
proposed
dict
verbose mode
k/v pairs of parameters passed into module

Sample:
{'log_time_stamp': 'date_tenthsecond', 'state': 'present'}
updates
list
always
commands sent to the device

Sample:
['info-center timestamp log date precision-time tenth-second']


Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Author

  • QijunPan (@CloudEngine-Ansible)

Hint

If you notice any issues in this documentation you can edit this document to improve it.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.5/modules/ce_info_center_log_module.html