Skip to content



Always use the FQCN (Fully Qualified Collection Name) arista.avd.add_md_toc when using this plugin.

Parse the input Markdown and add a Table of Contents between the toc_markers.


The filter is used in arista.avd.eos_designs to create a table of contents for Fabric Documentation.

The filter is also used in arista.avd.eos_cli_config_gen to create a table of contents for Device Documentation.


The below requirements are needed on the host that executes this module.

  • md_toc


Argument Type Required Default Value Restrictions Description
_input string True None Markdown to process.
skip_lines integer optional 0 Skip the first x lines when parsing the input Markdown.
toc_levels integer optional 3 How many levels of headings will be included in the TOC.
toc_marker string optional TOC will be inserted or updated between two of markers in the input Markdown.


- name: Generate fabric documentation
  tags: [build, provision, documentation]
  run_once: true
  delegate_to: localhost
  check_mode: no
    content: "{{ lookup('template','documentation/fabric-documentation.j2') | arista.avd.add_md_toc(skip_lines=3) }}"
    dest: "{{ fabric_dir }}/{{ fabric_name }}"
    mode: 0664

Return Values

Name Type Description
_value string Markdown with TOC inserted between the toc_markers.


  • Arista Ansible Team (@aristanetworks)

Last update: October 2, 2023