Default variable details
Some of debops.lldpd default variables have more extensive configuration
than simple strings or lists, here you can find documentation and examples for
them.
lldpd__configuration
These variables define the contents of the /etc/lldpd.d/
configuration directory. Each configuration entry is a file with contents
defined either directly, or via the options parameter. You can read the
lldpcli(8) manual page to see the available commands.
Examples
The default role configuration
includes creation of the ChassisID attribute override for virtual machines and
containers. To disable this functionality within the lldpd daemon
itself, you can add an "unconfigure" command:
lldpd__configuration:
- name: 'unchassis'
options:
- 'unconfigure system chassisid'
Alternatively, using the raw version:
lldpd__configuration:
- name: 'unchassis'
raw: |
unconfigure system chassisid
Specify the device description attribute:
lldpd__configuration:
- name: 'description'
options:
- 'configure system description': 'Custom device located in rack a1'
Syntax
The variables are defined as lists of YAML dictionaries. Each dictionary
defines a separate configuration file in the /etc/lldpd.d/ directory.
Each configuration entry is defined using specific parameters:
nameRequired. Name of the generated configuration file, the role will include the
.confsuffix automatically. Configuration files are read by the daemon in alphabetical order so naming is important. Entries with the samenameparameter can be overridden by subsequent entries.commentOptional. String or YAML text block with additional comments included in a given configuration file.
stateOptional. If not specified or
present, a given configuration file will be generated. Ifabsent, the configuration file will be removed from the host. Ifcomment, the configuration file will be generated but commands inside will be commented out. Ifignore, a given configuration entry will not be considered during template generation. This can be used to conditionally enable or disable configuration options.rawString or YAML text block with lldpcli(8) commands which will be included in the generated configuration file "as is".
optionsList of lldpcli(8) commands which will be included in the generated configuration file. The
optionslists from multiple entries with the samenameparameter are merged together. You can specify them either as a string which denotes the whole command, or as a YAML dictionary with key and value being the command and its argument quoted in double-quotes (""). Alternatively, you can define each command using a YAML dictionary with specific parameters:nameThe lldpcli(8) command. Multiple entris with the same
nameparameter are merged together in order of appearance and can override each other.optionIf a given command needs to be specified multiple times with different values, you can use the
optionparameter to specify the actual lldpcli(8) command to be included in the generated configuration file.valueThe value of a given lldpcli(8) command, surrounded by double quotes.
stateIf not defined or
present, a given command will be included in the generated configuration file. Ifabsent, a given command will not be included in the generated configuration file.