### Example Installation Instructions Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/examples/dual-dc-l3ls/README.md Provides instructions on how to install the AVD example. This typically involves cloning a repository and setting up the environment. ```markdown ansible-avd-examples/common/example-installation.md ``` -------------------------------- ### Install All AVD Examples Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/examples/README.md Use this command to install all available AVD examples into the default Ansible collection path. This is useful for setting up a reference inventory. ```shell ansible-playbook arista.avd.install_examples ``` -------------------------------- ### AVD Example Installation Output Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/examples/common/example-installation.md This is the expected output when the `ansible-avd.install_examples` playbook is executed successfully. It indicates that the example files have been copied. ```shell ~/ansible-avd-examples# ansible-playbook arista.avd.install_examples PLAY [Install Examples]********************************************************************************************** TASK [Copy all examples to ~/ansible-avd-examples]******************************************************************* changed: [localhost] PLAY RECAP ********************************************************************************************************************* localhost : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` -------------------------------- ### Inventory File with IP Addresses Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md This is the inventory file used in the example, which includes IP addresses for each device. It's recommended for simplicity in getting started but not for production environments. ```yaml --8< ansible_collections/arista/avd/examples/single-dc-l3ls/inventory.yml --8<-- ``` -------------------------------- ### Example Directory Structure Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/examples/single-dc-l3ls-ipv6/README.md This shows the file and directory structure for the single-dc-l3ls-ipv6 AVD example. ```shell ansible-avd-examples/ (or wherever the playbook was run) |-- single-dc-l3ls-ipv6 ├── ansible.cfg ├── documentation ├── group_vars ├── images ├── intended ├── inventory.yml ├── build.yml ├── deploy.yml ├── deploy-cvp.yml ├── README.md └── switch-basic-configurations ``` -------------------------------- ### AVT Configuration Example Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-adaptive-virtual-topology.md Example of how to configure Adaptive Virtual Topology settings in Ansible. ```yaml router_adaptive_virtual_topology: # Role name. topology_role: # Enables VXLAN gateway router profile. # Only applicable for `topology_role: edge`, `topology_role: transit region` or `topology_role: transit zone`. gateway_vxlan: # Region name and ID. region: name: id: # Zone name and ID. zone: name: id: # Site name and ID. site: name: id: profiles: # AVT Name. - name: # Name of the load-balance policy. load_balance_policy: # Name of the internet exit policy. internet_exit_policy: # Metric order to be used for path comparison. metric_order: preferred_metric: # AVT path outlier elimination. outlier_elimination: # Set true to disable the AVT path outlier elimination. disabled: # Change the threshold values for path comparison. threshold: # Jitter threshold in millisecond. jitter: # Latency threshold in millisecond. latency: # Load threshold percentage. Valid range <0.00-100.00>. load: # Loss-rate threshold percentage. Valid range <0.00-100.00>. loss_rate: # A sequence of application profiles mapped to some virtual topologies. policies: # Policy name. - name: matches: # Application profile name. - application_profile: # AVT Profile name. avt_profile: # Set DSCP for matched traffic. dscp: # Set traffic-class for matched traffic. traffic_class: vrfs: ``` -------------------------------- ### QoS Profile Configuration Example Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/qos-profiles.md Example of how to configure QoS profiles, including trust settings, service policies, and transmit queues with bandwidth guarantees and shaping. ```yaml qos_profiles: # Profile-Name. - name: trust: cos: dscp: shape: # Supported options are platform dependent. # Example: "< rate > kbps", "1-100 percent", "< rate > pps" rate: service_policy: type: # Policy-map name. qos_input: tx_queues: # TX-Queue ID. - id: bandwidth_percent: bandwidth_guaranteed_percent: priority: shape: # Supported options are platform dependent. # Example: "< rate > kbps", "1-100 percent", "< rate > pps" rate: # Text comment added to queue. comment: random_detect: # Explicit Congestion Notification. ecn: # Enable counter for random-detect ECNs. count: threshold: # Units to be used for the threshold values. ``` -------------------------------- ### AVD Playground Start Script Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/examples/dual-dc-l3ls/README.md This script is used to start the AVD playground environment. It is a common starting point for AVD examples. ```shell ansible-avd-examples/dual-dc-l3ls/start-avd-playground.sh ``` -------------------------------- ### Default Prefix Example Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_designs/docs/how-to/custom-structured-configuration.md This example shows how to add static routes and configure Ethernet interfaces using the default prefix for custom structured configuration variables. ```yaml custom_structured_configuration_static_routes: - prefix: 42.42.42.0/24 vrf: MGMT next_hop: 42.42.42.42 custom_structured_configuration_ethernet_interfaces: - name: Ethernet4000 description: My test ip_address: 10.1.2.3/12 shutdown: false type: routed mtu: 1500 peer: MY-own-peer peer_interface: Ethernet123 peer_type: my_precious ``` -------------------------------- ### Example Playbook Execution Output Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/examples/dual-dc-l3ls/README.md This is an example of the output seen when running the `build.yml` playbook. It shows the tasks executed by AVD, including verification and directory creation. ```shell user@ubuntu:~/ansible-avd-examples/dual-dc-l3ls$ ansible-playbook build.yml PLAY [Build Configs] *************************************************************************************************************************************************************** TASK [arista.avd.eos_designs : Verify Requirements] ******************************************************************************************************************************** AVD version v4.0.0-rc1-8-ge1382fdb8 Use -v for details. ok: [dc1-spine1 -> localhost] TASK [arista.avd.eos_designs : Create required output directories if not present] ********************************************************************************************************** ok: [dc1-leaf1a -> localhost] => (item=/home/user/Documents/git_projects/ansible-avd-examples/dual-dc-l3ls/intended/structured_configs) ok: [dc1-leaf1a -> localhost] => (item=/home/user/Documents/git_projects/ansible-avd-examples/dual-dc-l3ls/documentation/fabric) (...) ``` -------------------------------- ### Platform Settings Configuration Example Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_designs/docs/tables/platform-settings.md This example demonstrates how to configure platform-specific settings, including feature support, reload delays, and digital twin platform settings for different platforms. ```yaml platform_settings: - platforms: - default feature_support: queue_monitor_length_notify: false reload_delay: mlag: 300 non_mlag: 330 digital_twin: platform: vEOS-lab - platforms: - 7050X3 feature_support: queue_monitor_length_notify: false sflow_subinterfaces: false subinterface_mtu: false per_interface_l2_mru: false reload_delay: mlag: 300 non_mlag: 330 trident_forwarding_table_partition: flexible exact-match 16384 l2-shared 98304 l3-shared 131072 digital_twin: platform: vEOS-lab - platforms: - 720XP feature_support: poe: true queue_monitor_length_notify: false sflow_subinterfaces: false subinterface_mtu: false per_interface_l2_mru: false reload_delay: mlag: 300 non_mlag: 330 ``` -------------------------------- ### Build Playbook Example Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/examples/cv-pathfinder/README.md This playbook is used to build network configurations without a lab environment. It's useful for testing AVD output locally. ```yaml --8< ansible_collections/arista/avd/examples/cv-pathfinder/build.yml --8<-- ``` -------------------------------- ### Full L3 Leaf Configuration Example Source: https://github.com/aristanetworks/avd/blob/devel/docs/howto/fabric_topology/README.md This snippet provides a complete configuration example for an L3 leaf switch, including all necessary parameters for fabric integration. Use this as a reference for comprehensive leaf switch setup. ```cli --8<-- ansible_collections/arista/avd/extensions/molecule/howto/inventory/intended/configs/htft-leaf1a.cfg --8<-- ``` -------------------------------- ### Basic Custom Template Syntax Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_designs/docs/how-to/custom-templates.md This is an example of a basic custom Jinja2 template. Custom variables should start with an underscore to bypass schema validation. ```jinja2 _structured_configuration_variable_name: structured_configuration_variable_value {{ some_variable }} ``` -------------------------------- ### Update Custom Keys in Structured Config Source: https://github.com/aristanetworks/avd/blob/devel/docs/porting-guides/6.x.x.md In AVD 6.0.0 and later, custom keys in structured config must start with an underscore (_). This example shows how to update a key from `custom_key` to `_custom_key`. ```diff l3leaf: nodes: - name: host1 id: 101 bgp_as: 101 structured_config: - custom_key: [ custom_value ] + _custom_key: [ custom_value ] ``` -------------------------------- ### Router OSPF Configuration Example (YAML) Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-ospf.md Example of how to configure OSPF processes, including various parameters like router ID, network prefixes, timers, and redistribution. ```yaml router_ospf: process_ids: # OSPF Process ID. - id: # VRF Name for OSPF Process. vrf: passive_interface_default: # IPv4 Address. router_id: distance: external: inter_area: intra_area: log_adjacency_changes_detail: network_prefixes: - ipv4_prefix: area: bfd_enable: bfd_adjacency_state_any: no_passive_interfaces: # Interface Name. - distribute_list_in: route_map: max_lsa: timers: lsa: # Min interval in msecs between accepting the same LSA. rx_min_interval: tx_delay: # Delay to generate first occurrence of LSA in msecs. initial: # Min delay between originating the same LSA in msecs. min: # 1-600000 Maximum delay between originating the same LSA in msec. max: spf_delay: # Initial SPF schedule delay in msecs. initial: # Min Hold time between two SPFs in msecs. min: # Max wait time between two SPFs in msecs. max: default_information_originate: always: # Metric for default route. metric: # OSPF metric type for default route. metric_type: summary_addresses: # Summary Prefix Address. - prefix: tag: attribute_map: not_advertise: redistribute: static: enabled: # Route Map Name. route_map: include_leaked: connected: enabled: # Route Map Name. route_map: include_leaked: bgp: enabled: # Route Map Name. route_map: include_leaked: # Bandwidth in mbps. auto_cost_reference_bandwidth: areas: - id: filter: networks: # IPv4 Prefix. - # Prefix-List Name. prefix_list: type: no_summary: nssa_only: default_information_originate: # Metric for default route. metric: # OSPF metric type for default route. metric_type: maximum_paths: max_metric: router_lsa: external_lsa: override_metric: include_stub: # "wait-for-bgp" or Integer 5-86400. # Example: "wait-for-bgp" Or "222" on_startup: summary_lsa: override_metric: graceful_restart: enabled: # Specify maximum time in seconds to wait for graceful-restart to complete. grace_period: graceful_restart_helper: mpls_ldp_sync_default: # Multiline EOS CLI rendered directly on the Router OSPF process ID in the final EOS configuration. eos_cli: ``` -------------------------------- ### Generate device configuration in structured format Source: https://github.com/aristanetworks/avd/blob/devel/docs/plugins/Modules_and_action_plugins/eos_designs_structured_config.md Use this example to generate device configuration in a structured format. It specifies a temporary directory and includes custom Jinja2 templates to be processed after the initial structured configuration is generated. The `options` dictionary allows for custom merge strategies and filtering of empty keys for specific templates. ```yaml --- - name: Generate device configuration in structured format arista.avd.eos_designs_structured_config: tmp_dir: "intended/tmp_eos_designs" templates: - template: "custom_templates/custom_feature1.j2" - template: "custom_templates/custom_feature2.j2" options: list_merge: replace strip_empty_keys: false check_mode: false changed_when: false ``` -------------------------------- ### SNMP Configuration Examples Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/extensions/molecule/eos_cli_config_gen/documentation/devices/host1.md This section details various SNMP configurations including traps, engine ID, ACLs, local interfaces, VRF status, hosts, views, communities, groups, and users. Each snippet represents a specific aspect of SNMP setup. ```eos snmp-server traps snmpConfigManEvent ``` ```eos snmp engineID local 424242424242424242 ``` ```eos snmp engineID remote 6172697374615F6970 1.1.1.1 ``` ```eos snmp engineID remote DEADBEEFCAFE123456 2.2.2.2 port 1337 ``` ```eos snmp engineID remote 424242424242DEAD 42.42.42.42 ``` ```eos snmp engineID remote 424242424242DEAD6666 42.42.42.42 port 666 ``` ```eos ip access-list SNMP-MGMT 10 permit udp any snmp 20 permit snmp host 10.90.224.188 30 permit snmp host 10.90.224.189 40 permit snmp host leaf2.atd.lab 50 deny snmp any 60 permit ip any any ! ip access-list onur 10 permit snmp host 10.90.224.188 20 permit snmp host 10.90.224.189 30 permit snmp host leaf2.atd.lab 40 deny snmp any 50 permit ip any any ! ipv6 access-list SNMP-MGMT 10 permit udp any snmp 20 permit snmp host 2001:db8:1:1::1 30 permit snmp host 2001:db8:1:2::1 40 permit snmp host 2001:db8:1:3::1 50 deny snmp any 60 permit ipv6 any any ! ipv6 access-list onur_v6 10 permit udp any snmp 20 permit snmp host 2001:db8:1:1::1 30 permit snmp host 2001:db8:1:2::1 40 permit snmp host 2001:db8:1:3::1 50 deny snmp any 60 permit ipv6 any any ! ``` ```eos interface Management1 vrf MGMT ! interface Loopback0 vrf default ! interface Loopback12 vrf Tenant_A_APP_Zone ! interface Ethernet1 vrf AAA ! interface Ethernet2 vrf abc ! ``` ```eos snmp-server vrf default ``` ```eos snmp-server host 10.6.75.121 vrf MGMT version 1 traps ``` ```eos snmp-server host 10.6.75.121 vrf MGMT version 2c traps ``` ```eos snmp-server host 10.6.75.122 vrf MGMT version 2c traps ``` ```eos snmp-server host 10.6.75.99 vrf MGMT version 3 auth USER-READ-AUTH-NO-PRIV ``` ```eos snmp-server host 10.6.75.99 vrf MGMT version 3 auth USER-WRITE ``` ```eos snmp-server host 10.6.75.100 vrf MGMT version 3 priv USER-READ-AUTH-PRIV ``` ```eos snmp-server view VW-WRITE iso included ``` ```eos snmp-server view VW-READ iso included ``` ```eos snmp-server community ro access-list onur ``` ```eos snmp-server community rw access-list SNMP-MGMT view VW-READ ``` ```eos snmp-server community ro ``` ```eos snmp-server group GRP-READ-ONLY v3 priv read v3read ``` ```eos snmp-server group GRP-READ-WRITE v3 auth read v3read write v3write ``` ```eos snmp-server user USER-READ-NO-AUTH-NO-PRIV GRP-READ-ONLY v3 ``` ```eos snmp-server user USER-READ-AUTH-NO-PRIV GRP-READ-ONLY v3 auth sha ``` ```eos snmp-server user USER-READ-AUTH-PRIV GRP-READ-ONLY v3 auth sha priv aes ``` ```eos snmp-server user USER-READ-NO-AUTH-NO-PRIV-LOC GRP-READ-ONLY v3 engine-id 424242424242424242 ``` ```eos snmp-server user USER-READ-AUTH-NO-PRIV-LOC GRP-READ-ONLY v3 auth sha engine-id 424242424242424242 ``` ```eos snmp-server user USER-READ-AUTH-PRIV-LOC GRP-READ-ONLY v3 auth sha priv aes engine-id 424242424242424242 ``` ```eos snmp-server user USER-WRITE GRP-READ-WRITE v3 auth sha priv aes ``` ```eos snmp-server user REMOTE-USER-IP-ONLY GRP-REMOTE v3 remote-address 42.42.42.42 ``` ```eos snmp-server user REMOTE-USER-IP-PORT GRP-REMOTE v3 remote-address 42.42.42.42 port 666 ``` ```eos snmp-server user REMOTE-USER-IP-LOCALIZED GRP-REMOTE v3 auth sha remote-address 42.42.42.42 engine-id DEADBEEFCAFE123456 ``` -------------------------------- ### Example Point-to-Point Service Configuration Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_designs/docs/tables/network-services-point-to-point-services-settings.md An example demonstrating the structure for configuring point-to-point services, including pseudowire details, subinterfaces, and endpoints with specific interface and port-channel settings. ```yaml : - name: pseudowire_rt_base: point_to_point_services: - name: type: subinterfaces: - number: port_channel: structured_config: raw_eos_cli: structured_config: raw_eos_cli: endpoints: # 2-2 items - id: nodes: # >=1 items; required - interfaces: # >=1 items; required - port_channel: mode: short_esi: lldp_disable: ``` -------------------------------- ### Copy Specific AVD Example Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/examples/README.md Copy a specific AVD example to your current directory. Replace with the desired example's name. This is useful for isolating and testing individual examples. ```shell cp -r /home/${USER}/.ansible/collections/ansible_collections/arista/avd/examples//* . ``` -------------------------------- ### Install PyAVD Package Source: https://github.com/aristanetworks/avd/blob/devel/docs/pyavd/pyavd.md Install the PyAVD Python package using pip. This command also installs necessary Python dependencies. ```sh pip install pyavd ``` -------------------------------- ### Platform Settings Configuration Example Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_designs/docs/tables/platform-settings.md This YAML snippet demonstrates how to configure platform-specific settings. It outlines the logic for matching platforms based on regex and the precedence of custom settings over defaults. It also explains how to override or extend default platform configurations. ```yaml ```yaml # Platform settings. # The first entry found where the `platform` node setting is fully matched by any regex in the `platforms` list will be chosen. # If no matches are found, the first entry containing a platform `default` will be chosen. # The default values will be overridden if `platform_settings` is defined. # If you need to replace all the default platforms, it is recommended to copy the defaults and modify them. # If you need to add custom platforms, create them under `custom_platform_settings`. # Entries under `custom_platform_settings` will be matched before the equivalent entries from `platform_settings`. ``` ``` -------------------------------- ### Install AVD Collections with Ansible Galaxy Source: https://github.com/aristanetworks/avd/blob/devel/docs/release-notes/3.x.x.md If AVD is installed via GIT clone, use this command to install the required Ansible collections. ```shell ansible-galaxy collection install -r ansible-avd/ansible_collections/arista/avd/collections.yml ``` -------------------------------- ### Install Additional Python Dependencies for AVD Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/README.md Install the required Python packages for the AVD collection. This command dynamically determines the AVD version and installs the matching pyavd package. ```shell export ARISTA_AVD_VERSION=$(ansible-galaxy collection list arista.avd --format yaml | tail -1 | cut -d: -f2 | tr '-' '.') pip3 install "pyavd[ansible-collection]==$ARISTA_AVD_VERSION" ``` -------------------------------- ### Install Arista AVD Ansible Collection and Python Package Source: https://context7.com/aristanetworks/avd/llms.txt Installs the Arista AVD Ansible collection and the matching Python package. It dynamically determines the version to install based on the collection version. ```shell # Install the Ansible collection ansible-galaxy collection install arista.avd # Install the matching Python package (with Ansible extras) export ARISTA_AVD_VERSION=$(ansible-galaxy collection list arista.avd --format yaml | tail -1 | cut -d: -f2 | tr '-' '.') pip install "pyavd[ansible-collection]==$ARISTA_AVD_VERSION" # Or install pyavd standalone (no Ansible required) pip install pyavd ``` -------------------------------- ### Playbook Execution Output Example Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/examples/isis-ldp-ipvpn/README.md This is an example of the output shown when executing the deploy playbook. It indicates successful task completion, including collection loading and directory creation. ```shell user@ubuntu:~/isis-ldp-ipvpn$ ansible-playbook deploy.yml PLAY [Run AVD] ***************************************************************************************************************************************************************************** TASK [arista.avd.eos_designs : Collection arista.avd version 3.5.0 loaded from /home/user/.ansible/collections/ansible_collections] ****************************************************** ok: [p1] TASK [arista.avd.eos_designs : Create required output directories if not present] ********************************************************************************************************** ok: [p1 -> localhost] => (item=/home/user/Documents/git_projects/ansible-avd-examples/isis-ldp-ipvpn/intended/structured_configs) ok: [p1 -> localhost] => (item=/home/user/Documents/git_projects/ansible-avd-examples/isis-ldp-ipvpn/documentation/fabric) (...) ``` -------------------------------- ### Network Ports Data Example Source: https://github.com/aristanetworks/avd/blob/devel/docs/porting-guides/5.x.x.md Example of the `network_ports` data structure with endpoint information for interface descriptions. ```yaml network_ports: - switches: [ s1-leaf1 ] switch_ports: [ Ethernet10-11 ] endpoint: printers mode: access vlans: "10" ``` -------------------------------- ### Deploy Device Configs and Static Configlets (Previous Method) Source: https://github.com/aristanetworks/avd/blob/devel/docs/howto/migrate-to-cv-deploy.md Use this when deploying device configurations and static configlets separately. First, deploy device configurations using eos_config_deploy_cvp, then upload static configlets with cvp_configlet_upload. ```yaml --- - name: Deploy to CloudVision hosts: cloudvision gather_facts: false tasks: # Task 1 - name: Deploy Device Configurations ansible.builtin.import_role: name: arista.avd.eos_config_deploy_cvp vars: container_root: 'DC1_FABRIC' configlets_prefix: 'DC1-AVD' device_filter: 'DC1' state: present # Task 2 - name: Deploy Static Configlets ansible.builtin.import_role: name: arista.avd.cvp_configlet_upload vars: configlet_directory: "configlets/" file_extension: "txt" configlets_cvp_prefix: "DC1-AVD" ``` -------------------------------- ### Event Handler Configuration Example Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_designs/docs/tables/event-handlers.md This example demonstrates a basic event handler configuration in YAML. It includes a name, actions to perform (logging and incrementing a device health metric), a delay, and a trigger condition. ```yaml event_handlers: - name: "MyEventHandler" actions: log: true increment_device_health_metric: "my_metric" delay: 5 trigger: "on-logging" trigger_on_logging: poll_interval: 60 regex: ".*error.*" ``` -------------------------------- ### Install Supported jsonschema Version Source: https://github.com/aristanetworks/avd/blob/devel/docs/release-notes/3.x.x.md Install the required version of the Python jsonschema package using pip. ```bash pip3 install "jsonschema>=4.5.1" ``` -------------------------------- ### Ethernet Interface Configuration Example Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ethernet-interfaces.md This YAML snippet demonstrates the configuration of an Ethernet interface, including basic settings like description, shutdown, load interval, speed, MTU, and loop protection. ```yaml ethernet_interfaces: - name: Ethernet1 description: Uplink to core shutdown: false load_interval: 30 speed: 100g mtu: 9214 loop_protection: true ``` -------------------------------- ### Install Ansible Utilities Collection Source: https://github.com/aristanetworks/avd/blob/devel/docs/porting-guides/6.x.x.md If your playbooks or templates relied on functionalities from the `ansible.utils` collection, you must now explicitly install it. ```shell ansible-galaxy collection install ansible.utils ``` -------------------------------- ### Multiple Prefixes Example Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_designs/docs/how-to/custom-structured-configuration.md Demonstrates using multiple custom prefixes to merge and override configurations. Later prefixes can override values from earlier ones. ```yaml custom_structured_configuration_prefix: [ my_dci_ , my_special_dci_ ] my_dci_ethernet_interfaces: - name: Ethernet4000 description: My test ip_address: 10.1.2.3/12 shutdown: false type: routed mtu: 1500 peer: MY-own-peer peer_interface: Ethernet123 peer_type: my_precious my_special_dci_ethernet_interfaces: - name: Ethernet4000 ip_address: 10.3.2.1/21 ``` -------------------------------- ### Install Specific arista.avd Collection Version Source: https://github.com/aristanetworks/avd/blob/devel/docs/installation/collection-installation.md Installs a specific version of the pyavd Python package and the arista.avd Ansible collection. ```shell pip install "pyavd[ansible]==5.7.3" ansible-galaxy collection install arista.avd:==5.7.3 ``` -------------------------------- ### MAC Security Configuration Example Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/mac-security.md Example YAML configuration for MAC security, including license, profiles, and various security settings. ```yaml mac_security: license: license_name: license_key: fips_restrictions: profiles: # Profile-Name. - name: cipher: connection_keys: - id: encrypted_key: fallback: mka: key_server_priority: session: # Rekey period in seconds. rekey_period: sci: l2_protocols: ethernet_flow_control: mode: lldp: mode: traffic_unprotected: # Allow/drop the transmit/receive of unprotected traffic. action: # Allow transmit/receive of encrypted traffic using operational SAK and block otherwise. allow_active_sak: replay_protection: # Disable replay protection. disabled: # Set replay protection window size. window: ``` -------------------------------- ### Match-list Configurations Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/extensions/molecule/eos_cli_config_gen/documentation/devices/host1.md Examples of match-list configurations for matching prefixes and strings. ```eos !\nmatch-list input string molecule\n 10 match regex ^.*MOLECULE.*$ 20 match regex ^.*TESTING.* ! match-list input prefix-ipv4 molecule_v4 match prefix-ipv4 10.10.10.0/24 match prefix-ipv4 10.10.20.0/24 ! match-list input prefix-ipv6 molecule_v6 match prefix-ipv6 2001:0DB8::/32 ``` -------------------------------- ### Install PyAVD with Ansible Extras Source: https://github.com/aristanetworks/avd/blob/devel/docs/pyavd/pyavd.md Install PyAVD with optional Ansible collection Python requirements using pip with the 'ansible' extra. ```sh pip install pyavd[ansible] ``` -------------------------------- ### Usage Example Command Source: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/roles/eos_snapshot/README.md Demonstrates the command-line execution of an Ansible playbook that utilizes the eos_snapshot role. ```shell ansible-playbook playbooks/pb_collect_yml --inventory inventory/inventory.yml ```