Dell-Networking.dellos-logging

Logging Role

=========== This role helps set up global logging settings and configure logging servers. It is compatible with dellos6, dellos9, and dellos10.

To use the Logging role, you need an SSH connection to a Dell EMC Networking device. You can use the built-in connection variables provided by the operating system.

Installation


Run the following command to install the Logging role:

ansible-galaxy install Dell-Networking.dellos-logging

Role Variables


  • The role uses the variable ansible_network_os, which can be set to dellos6, dellos9, or dellos10.
  • If the variable dellos_cfg_generate is true, it will create configuration commands for the role in a file.
  • Setting any role variable with a state variable to "absent" will cancel its configuration.
  • Providing an empty value for any variable will also cancel that configuration.
  • Remember that variable names are case-sensitive.

dellos_logging Keys

Key Type Description Supported
logging list Configures the logging server (see logging.*) dellos6, dellos9, dellos10
logging.ip string Required. Sets the IPv4 address for the logging server (A.B.C.D format) dellos6, dellos9, dellos10
logging.secure_port integer Specifies the TLS port for log messages dellos9
logging.tcp_port integer Specifies TCP port for log messages if secure_port isn't defined dellos9
logging.udp_port integer Specifies UDP port for log messages if both TCP and secure port are not defined dellos9
logging.vrf dict Specifies a VRF instance for reaching the host dellos9
console dictionary Configures logging to the console (see console.*) dellos10
log_file dictionary Configures logging to a log file (see log_file.*) dellos10
buffer integer Sets the severity level for buffered logging (0 to 7) dellos9
on boolean If true, enables logging to all supported destinations dellos9
extended boolean Enables extended logging if true dellos9
source_interface string Sets the source interface for logging dellos6, dellos9, dellos10

NOTE: An asterisk (*) indicates the default value if none is specified.

Connection Variables


When using Ansible Dell EMC Networking roles, you need connection details to communicate with the devices. This can be in the Ansible group_vars, host_vars directories, inventory, or within the playbook.

Key Required Choices Description
ansible_host yes Specifies the device hostname or address
ansible_port no Port for connecting, defaults to 22
ansible_ssh_user no Username for device CLI login
ansible_ssh_pass no Password for connecting to the device
ansible_network_os yes dellos6, dellos9, dellos10, null* Loads correct plugins for communication

NOTE: An asterisk (*) indicates the default value if not specified.

Dependencies


The dellos-logging role relies on modules included in the core Ansible code, present since Ansible version 2.2.0.

Example Playbook


This example sets up logging servers using the dellos-logging role. It defines a hosts file with switch details and variables.

Sample Hosts File

leaf1 ansible_host= <ip_address>

Sample host_vars/leaf1

hostname: leaf1
ansible_network_os: dellos9
build_dir: ../temp/dellos9
dellos_logging:
  logging:
    - ip: 1.1.1.1
      state: present
    ...
source_interface: "fortyGigE 1/9"

Simple Playbook to Set Up Logging - leaf.yaml

- hosts: leaf1
  roles:
    - Dell-Networking.dellos-logging

Running the Playbook

To run the playbook, use:

ansible-playbook -i hosts leaf.yaml

(c) 2017 Dell Inc. or its subsidiaries. All Rights Reserved.

Informazioni sul progetto

The dellos-logging role facilitates the configuration of logging attributes in devices running Dell EMC Networking Operating Systems.

Installa
ansible-galaxy install Dell-Networking.dellos-logging
Licenza
apache-2.0
Download
68.2k
Proprietario