├── .gitignore ├── LICENSE ├── README.md ├── ansible.cfg ├── group_vars ├── all │ └── data.yml └── eos │ ├── audit.yml │ ├── connection.yml │ └── data.yml ├── host_vars ├── switch1 │ ├── data.yml │ └── l2_interfaces.yml ├── switch2 │ ├── data.yml │ └── l2_interfaces.yml └── switch3 │ ├── data.yml │ └── l2_interfaces.yml ├── inventory.ini ├── outputs ├── audit │ ├── fragments │ │ ├── _audit_report_structure.md │ │ ├── switch1.md │ │ ├── switch2.md │ │ └── switch3.md │ └── report.md ├── backup │ ├── switch1_config.2020-05-03@23:14:45 │ ├── switch2_config.2020-05-03@23:14:45 │ └── switch3_config.2020-05-03@23:14:44 ├── cli │ ├── switch1 │ │ ├── show interfaces description.txt │ │ ├── show ip bgp summary.txt │ │ ├── show ip interface brief.txt │ │ ├── show ip route.txt │ │ ├── show lldp neighbors.txt │ │ ├── show running-config section bgp.txt │ │ ├── show running-config.txt │ │ └── show version | json.txt │ ├── switch2 │ │ ├── show interfaces description.txt │ │ ├── show ip bgp summary.txt │ │ ├── show ip interface brief.txt │ │ ├── show ip route.txt │ │ ├── show lldp neighbors.txt │ │ ├── show running-config section bgp.txt │ │ ├── show running-config.txt │ │ └── show version | json.txt │ └── switch3 │ │ ├── show interfaces description.txt │ │ ├── show ip bgp summary.txt │ │ ├── show ip interface brief.txt │ │ ├── show ip route.txt │ │ ├── show lldp neighbors.txt │ │ ├── show running-config section bgp.txt │ │ ├── show running-config.txt │ │ └── show version | json.txt ├── conf_generated │ ├── switch1.cfg │ ├── switch2.cfg │ └── switch3.cfg └── facts │ ├── hardware │ ├── switch1.json │ ├── switch2.json │ └── switch3.json │ ├── resources │ ├── switch1 │ │ ├── L2_interfaces.json │ │ ├── interfaces.json │ │ └── vlans.json │ ├── switch2 │ │ ├── L2_interfaces.json │ │ ├── interfaces.json │ │ └── vlans.json │ └── switch3 │ │ ├── L2_interfaces.json │ │ ├── interfaces.json │ │ └── vlans.json │ └── running_config │ ├── switch1.txt │ ├── switch2.txt │ └── switch3.txt ├── playbook_backup_configuration.yml ├── playbook_collect_commands.yml ├── playbook_collect_facts_config.yml ├── playbook_collect_facts_hardware.yml ├── playbook_collect_facts_resources.yml ├── playbook_configure_login_banner.yml ├── playbook_configure_using_files.yml ├── playbook_configure_using_lines.yml ├── playbook_enable_http_api.yml ├── playbook_generate_audit_report.yml ├── playbook_manage_vlans.yml ├── playbook_print_version_and_model.yml ├── playbook_validate_states.yml ├── requirements.txt ├── roles ├── validate_bgp_neigbhbors │ ├── README.md │ └── tasks │ │ └── main.yml ├── validate_device_model_and_SW_release │ ├── README.md │ └── tasks │ │ └── main.yml ├── validate_environment │ ├── README.md │ └── tasks │ │ └── main.yml ├── validate_interfaces_status │ ├── README.md │ └── tasks │ │ └── main.yml ├── validate_ip_reachability │ ├── README.md │ └── tasks │ │ └── main.yml ├── validate_lldp_neighbors │ ├── README.md │ └── tasks │ │ └── main.yml └── validate_routing_table │ ├── README.md │ └── tasks │ └── main.yml ├── templates ├── audit_report.j2 ├── audit_report_structure.j2 └── config.j2 └── topology.png /.gitignore: -------------------------------------------------------------------------------- 1 | # outputs/backup -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2020 Arista Networks 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![GitHub](https://img.shields.io/github/license/ksator/arista_eos_automation_with_ansible) 2 | 3 | # Table of content 4 | [About this repository](#about-this-repository) 5 | [Playbooks description](#playbooks-description) 6 | [Repository structure](#repository-structure) 7 | [Network topology](#network-topology) 8 | 9 | # About this repository 10 | 11 | This repository has Ansible playbooks examples to automate Arista EOS. 12 | 13 | # Playbooks description 14 | 15 | The playbooks are at the root of this repository. The playbooks name is `playbook_*.yml`. 16 | 17 | These playbooks update devices configuration: 18 | 19 | - [playbook_enable_http_api.yml](playbook_enable_http_api.yml) uses SSH to enable eAPI. 20 | 21 | - [playbook_configure_using_files.yml](playbook_configure_using_files.yml) generates the EOS configuration files [conf_generated](outputs/conf_generated) from the template [config.j2](templates/config.j2) and loads the configuration generated on the EOS devices. 22 | It is used to configure this [lab](#network-topology) (interfaces and BGP configuration). 23 | 24 | - [playbook_manage_vlans.yml](playbook_manage_vlans.yml) manages VLANs and L2 interfaces in a declarative way. 25 | 26 | - [playbook_configure_using_lines.yml](playbook_configure_using_lines.yml) shows how you can configure a device with a set of commands. 27 | 28 | - [playbook_configure_login_banner.yml](playbook_configure_login_banner.yml) configures a multi lines login banner. 29 | 30 | These playbooks collect data from devices: 31 | 32 | - [playbook_print_version_and_model.yml](playbook_print_version_and_model.yml) executes a `show version` command and parses the command output and print the EOS version and device model. 33 | 34 | - [playbook_collect_commands.yml](playbook_collect_commands.yml) collects the EOS `show commands` defined in the file [audit.yml](group_vars/eos/audit.yml) and save the output in the directory [cli](outputs/cli). 35 | The output can be used for a humans review. 36 | To collect others EOS `show commands`, simply update the file [audit.yml](group_vars/eos/audit.yml). 37 | 38 | - [playbook_backup_configuration.yml](playbook_backup_configuration.yml) backups the running configuration in the directory [backup](outputs/backup). 39 | 40 | - [playbook_collect_facts_config.yml](playbook_collect_facts_config.yml) backups the running configuration in the directory [running_config](outputs/facts/running_config). 41 | 42 | - [playbook_collect_facts_hardware.yml](playbook_collect_facts_hardware.yml) returns the hardware facts (structured data about the device: SN, model, software version ...) and saves them in the directory [hardware](outputs/facts/hardware). 43 | 44 | - [playbook_collect_facts_resources.yml](playbook_collect_facts_resources.yml) returns some resources facts (structured data about the device: vlans, interfaces, ...) and saves them in the directory [resources](outputs/facts/resources). 45 | 46 | These playbooks validate the devices states: 47 | 48 | - [playbook_validate_states.yml](playbook_validate_states.yml) validates the devices states. 49 | It is used to validate this [lab](#network-topology). 50 | The validation covers HW model, SW release, environment (cooling, temperature, power), interfaces status, LLDP topology, BGP sessions, IP reachability tests. 51 | It compares the actual states with the desired states, and reports mismatches. 52 | - The desired states are described in variables ([host_vars](host_vars) and [group_vars](group_vars) directories). So we reuse the same variables we already used to generate the configuration files. 53 | - The actual states are the states on the devices. To get the actual states, it runs `show commands` with a json output, and parses the output. 54 | - This playbook is interresting for CI because if a test fails, the pipeline will fail (either all the tests pass, or, the pipeline fails). 55 | 56 | - [playbook_generate_audit_report.yml](playbook_generate_audit_report.yml) audits the devices and generates this humans readable [report](outputs/audit/report.md). 57 | It is used to audit this [lab](#network-topology). 58 | The audit covers HW model, SW release, environment (cooling, temperature, power), interfaces status, LLDP topology, BGP sessions, IP reachability tests. 59 | It compares the actual states with the desired states and generates a report: 60 | - The desired states are described in variables ([host_vars](host_vars) and [group_vars](group_vars) directories). So we reuse the same variables we already used to generate the configuration files. 61 | - The actual states are the states on the devices. 62 | - It runs `show commands` with a json representation and registers the outputs in variables. It doesnt process the data collected. 63 | - Then it renders a template to generate the report. The data processing (data parsing and data comparaison) is done by the template (not by the playbook). 64 | - This playbook doesnt fail if a test fails (because this playbook doesn’t run the tests itself, the tests are ran by the template). So as example if a bgp session is not established the playbook will not fail but the report generated by the template will highlight this issue. 65 | 66 | # Repository structure 67 | 68 | - The playbooks are at the root of this repository. The playbooks name is `playbook_*.yml`. 69 | - The inventory file is [inventory.ini](inventory.ini) 70 | - The variables are defined in the [host_vars](host_vars) and [group_vars](group_vars) directories 71 | - The directory [templates](templates) has the jinja templates used by the playbooks 72 | - The directory [roles](roles) has the roles used by the playbooks 73 | - The directory [outputs](outputs) has the playbooks output 74 | - The requirements file is [requirements.txt](requirements.txt) 75 | - The Ansible config file is [ansible.cfg](ansible.cfg) 76 | 77 | # Network topology 78 | 79 | 3 EOS devices connected in a triangle topology and configured with EBGP 80 | 81 | ![topology.png](topology.png) 82 | -------------------------------------------------------------------------------- /ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | inventory = inventory.ini 3 | deprecation_warnings = False 4 | host_key_checking = False 5 | gathering = explicit 6 | # collections_paths = 7 | # roles_path = 8 | stdout_callback = yaml 9 | callback_whitelist = profile_roles, profile_tasks, timer 10 | -------------------------------------------------------------------------------- /group_vars/all/data.yml: -------------------------------------------------------------------------------- 1 | ansible_python_interpreter: $(which python) 2 | save_dir: "{{playbook_dir}}/outputs" 3 | domain_name: "lab.local" -------------------------------------------------------------------------------- /group_vars/eos/audit.yml: -------------------------------------------------------------------------------- 1 | cli_to_collect: 2 | - show ip bgp summary 3 | - show lldp neighbors 4 | - show ip interface brief 5 | - show interfaces description 6 | - show ip route 7 | - show version | json 8 | - show running-config 9 | - show running-config section bgp 10 | 11 | validation: 12 | mode: 13 | loose: true -------------------------------------------------------------------------------- /group_vars/eos/connection.yml: -------------------------------------------------------------------------------- 1 | ansible_user: 'ansible' 2 | ansible_password: 'ansible' 3 | ansible_network_os: eos 4 | ansible_become: yes 5 | ansible_become_method: enable -------------------------------------------------------------------------------- /group_vars/eos/data.yml: -------------------------------------------------------------------------------- 1 | version: 4.22.4M-2GB 2 | model: DCS-7150S-64-CL-F 3 | 4 | vlans: 5 | - vlan_id: 10 6 | name: red 7 | - vlan_id: 20 8 | name: blue 9 | - vlan_id: 30 10 | name: yellow 11 | - vlan_id: 40 12 | 13 | login_banner: | 14 | WARNING: This is a multi lines login banner 15 | This is the one line of banner text. 16 | This is the another line of banner text. 17 | 18 | -------------------------------------------------------------------------------- /host_vars/switch1/data.yml: -------------------------------------------------------------------------------- 1 | hostname: swicth1 2 | loopback: 172.16.0.1 3 | as: 65001 4 | topology: 5 | - interface: Ethernet3 6 | lldp_neighbor: switch2 7 | lldp_neighbor_interface: Ethernet2 8 | ip: 10.10.10.0 9 | subnet: 31 10 | ebgp_peer_ip: 10.10.10.1 11 | ebgp_peer_loopback: 172.16.0.2 12 | - interface: Ethernet4 13 | lldp_neighbor: switch3 14 | lldp_neighbor_interface: Ethernet2 15 | ip: 10.10.10.2 16 | subnet: 31 17 | ebgp_peer_ip: 10.10.10.3 18 | ebgp_peer_loopback: 172.16.0.3 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /host_vars/switch1/l2_interfaces.yml: -------------------------------------------------------------------------------- 1 | l2_interfaces: 2 | - name: Ethernet5 3 | access: 4 | vlan: 30 5 | - name: Ethernet6 6 | access: 7 | vlan: 40 8 | - name: Ethernet7 9 | trunk: 10 | native_vlan: 10 11 | trunk_allowed_vlans: 20, 30, 40 12 | -------------------------------------------------------------------------------- /host_vars/switch2/data.yml: -------------------------------------------------------------------------------- 1 | hostname: swicth2 2 | loopback: 172.16.0.2 3 | as: 65002 4 | topology: 5 | - interface: Ethernet2 6 | lldp_neighbor: switch1 7 | lldp_neighbor_interface: Ethernet3 8 | ip: 10.10.10.1 9 | subnet: 31 10 | ebgp_peer_ip: 10.10.10.0 11 | ebgp_peer_loopback: 172.16.0.1 12 | - interface: Ethernet24 13 | lldp_neighbor: switch3 14 | lldp_neighbor_interface: Ethernet24 15 | ip: 10.10.10.4 16 | subnet: 31 17 | ebgp_peer_ip: 10.10.10.5 18 | ebgp_peer_loopback: 172.16.0.3 19 | 20 | -------------------------------------------------------------------------------- /host_vars/switch2/l2_interfaces.yml: -------------------------------------------------------------------------------- 1 | l2_interfaces: 2 | - name: Ethernet8 3 | access: 4 | vlan: 20 5 | - name: Ethernet9 6 | access: 7 | vlan: 20 8 | - name: Ethernet10 9 | trunk: 10 | native_vlan: 10 11 | trunk_allowed_vlans: 20, 30, 40 12 | -------------------------------------------------------------------------------- /host_vars/switch3/data.yml: -------------------------------------------------------------------------------- 1 | hostname: swicth3 2 | loopback: 172.16.0.3 3 | as: 65003 4 | topology: 5 | - interface: Ethernet2 6 | lldp_neighbor: switch1 7 | lldp_neighbor_interface: Ethernet4 8 | ip: 10.10.10.3 9 | subnet: 31 10 | ebgp_peer_ip: 10.10.10.2 11 | ebgp_peer_loopback: 172.16.0.1 12 | - interface: Ethernet24 13 | lldp_neighbor: switch2 14 | lldp_neighbor_interface: Ethernet24 15 | ip: 10.10.10.5 16 | subnet: 31 17 | ebgp_peer_ip: 10.10.10.4 18 | ebgp_peer_loopback: 172.16.0.2 19 | 20 | -------------------------------------------------------------------------------- /host_vars/switch3/l2_interfaces.yml: -------------------------------------------------------------------------------- 1 | l2_interfaces: 2 | - name: Ethernet1 3 | access: 4 | vlan: 20 5 | - name: Ethernet3 6 | access: 7 | vlan: 20 8 | - name: Ethernet4 9 | trunk: 10 | native_vlan: 10 11 | trunk_allowed_vlans: 20, 30, 40 12 | -------------------------------------------------------------------------------- /inventory.ini: -------------------------------------------------------------------------------- 1 | [all:children] 2 | arista 3 | 4 | [arista:children] 5 | eos 6 | 7 | [eos] 8 | switch1 ansible_host=10.83.28.123 9 | switch2 ansible_host=10.83.28.124 10 | switch3 ansible_host=10.83.28.125 11 | # s7059 ansible_host=10.83.28.198 12 | # s7156 ansible_host=10.83.28.124 13 | # s7161 ansible_host=10.83.28.189 14 | # s7261 ansible_host=10.83.28.205 15 | # s7286 ansible_host=10.83.28.218 16 | # s70510 ansible_host=10.83.28.199 17 | # s72813 ansible_host=10.83.28.238 18 | # s72814 ansible_host=10.83.28.208 19 | # s72815 ansible_host=10.83.28.209 -------------------------------------------------------------------------------- /outputs/audit/fragments/_audit_report_structure.md: -------------------------------------------------------------------------------- 1 | # Audit report structure 2 | [Report for device switch1.lab.local](#report-for-device-switch1lablocal) 3 | [Report for device switch2.lab.local](#report-for-device-switch2lablocal) 4 | [Report for device switch3.lab.local](#report-for-device-switch3lablocal) 5 | -------------------------------------------------------------------------------- /outputs/audit/fragments/switch1.md: -------------------------------------------------------------------------------- 1 | # Report for device switch1.lab.local 2 | 3 | ## Device details (switch1) 4 | 5 | ### HW model 6 | 7 | 8 | 9 | | Expected model | Actual model | Result | 10 | | :-----: | :-----: | :-----: | 11 | | DCS-7150S-64-CL-F | DCS-7150S-64-CL-F | PASS | 12 | 13 | ### SW version 14 | 15 | 16 | 17 | 18 | | Expected version | Actual version | Result | 19 | | :-----: | :-----: | :-----: | 20 | | 4.22.4M-2GB | 4.22.4M-2GB | PASS | 21 | 22 | ## Environment (switch1) 23 | 24 | ### Power 25 | 26 | | Power Supply | State | Result | 27 | | :-----: | :-----: | :-----: | 28 | | 1 | powerLoss | FAIL | 29 | | 2 | ok | PASS | 30 | 31 | ### Temperature 32 | 33 | 34 | 35 | | System temperature status| Result | 36 | | :-----: | :-----: | 37 | | temperatureOk | PASS | 38 | 39 | ### Cooling 40 | 41 | #### Power supplies 42 | 43 | | Power Supply | Fans status | Result | 44 | | :-----: | :-----: | :-----: | 45 | | PowerSupply1 | ok | PASS | 46 | | PowerSupply2 | ok | PASS | 47 | 48 | #### Fan trays 49 | 50 | | Fan tray | Fans status | Result | 51 | | :-----: | :-----: | :-----: | 52 | | 1 | ok | PASS | 53 | | 2 | ok | PASS | 54 | | 3 | ok | PASS | 55 | | 4 | ok | PASS | 56 | 57 | 58 | ## Interfaces admin and operationnal status (switch1) 59 | 60 | ### interfaces connected to other devices 61 | 62 | | Interface | Admin status | Operationnal Status | Result | 63 | | :-----: | :-----: | :-----: | :-----: | 64 | | Ethernet3 | up | up | PASS 65 | | Ethernet4 | up | up | PASS 66 | ## LLDP topology (switch1) 67 | 68 | | Interface | Expected neighbor | Actual neighbor | Expected neighbor interface | Actual neighbor interface | Result | 69 | | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: | 70 | | Ethernet3 | switch2.lab.local | switch2.lab.local | Ethernet2 | Ethernet2 | PASS | 71 | | Ethernet4 | switch3.lab.local | switch3.lab.local | Ethernet2 | Ethernet2 | PASS | 72 | ## BGP (switch1) 73 | 74 | ### EBGP sessions state 75 | 76 | | EBGP Peer | Session state | Result | 77 | | :-----: | :-----: | :-----: | 78 | | 10.10.10.1 | Established | PASS | 79 | | 10.10.10.3 | Established | PASS | 80 | ### IPv4 prefixes sent to EBGP peer 81 | 82 | 83 | 84 | | EBGP Peer | IPv4 Prefixes sent | Result | 85 | | :-----: | :-----: | :-----: | 86 | | 10.10.10.1 | 5 | PASS | 87 | | 10.10.10.3 | 6 | PASS | 88 | ### IPv4 prefixes received from EBGP peer 89 | 90 | 91 | | EBGP Peer | IPv4 Prefixes received | Result | 92 | | :-----: | :-----: | :-----: | 93 | | 10.10.10.1 | 5 | PASS 94 | | 10.10.10.3 | 5 | PASS 95 | ## Routing table (switch1) 96 | 97 | | Destination (EBGP peer loopback) | via next hop | via interface | Result | 98 | | :-----: | :-----: | :-----: | :-----: | 99 | | 172.16.0.2/32 | 10.10.10.1 | Ethernet3 | PASS | 100 | | 172.16.0.3/32 | 10.10.10.3 | Ethernet4 | PASS | 101 | ## IP reachability (switch1) 102 | 103 | ### Ping EBGP peers from switch1 interfaces 104 | 105 | 106 | | source interface | IP source | IP destination (EBGP peer) | Result | 107 | | :-----: | :-----: | :-----: | :-----: | 108 | | Ethernet3 | 10.10.10.0 | 10.10.10.1 | PASS | 109 | | Ethernet4 | 10.10.10.2 | 10.10.10.3 | PASS | 110 | ### Ping EBGP peers loopback from switch1 interfaces 111 | 112 | | source interface | IP source | IP destination (EBGP peer loopback) | Result | 113 | | :-----: | :-----: | :-----: | :-----: | 114 | | Ethernet3 | 10.10.10.0 | 172.16.0.2 | PASS | 115 | | Ethernet4 | 10.10.10.2 | 172.16.0.3 | PASS | 116 | ### Ping EBGP peers loopback from switch1 loopback 117 | | IP source | IP destination (EBGP peer loopback) | Result | 118 | | :-----: | :-----: | :-----: | 119 | | 172.16.0.1 | 172.16.0.2 | PASS | 120 | | 172.16.0.1 | 172.16.0.3 | PASS | 121 | -------------------------------------------------------------------------------- /outputs/audit/fragments/switch2.md: -------------------------------------------------------------------------------- 1 | # Report for device switch2.lab.local 2 | 3 | ## Device details (switch2) 4 | 5 | ### HW model 6 | 7 | 8 | 9 | | Expected model | Actual model | Result | 10 | | :-----: | :-----: | :-----: | 11 | | DCS-7150S-64-CL-F | DCS-7150S-64-CL-F | PASS | 12 | 13 | ### SW version 14 | 15 | 16 | 17 | 18 | | Expected version | Actual version | Result | 19 | | :-----: | :-----: | :-----: | 20 | | 4.22.4M-2GB | 4.22.4M-2GB | PASS | 21 | 22 | ## Environment (switch2) 23 | 24 | ### Power 25 | 26 | | Power Supply | State | Result | 27 | | :-----: | :-----: | :-----: | 28 | | 1 | powerLoss | FAIL | 29 | | 2 | ok | PASS | 30 | 31 | ### Temperature 32 | 33 | 34 | 35 | | System temperature status| Result | 36 | | :-----: | :-----: | 37 | | temperatureOk | PASS | 38 | 39 | ### Cooling 40 | 41 | #### Power supplies 42 | 43 | | Power Supply | Fans status | Result | 44 | | :-----: | :-----: | :-----: | 45 | | PowerSupply1 | ok | PASS | 46 | | PowerSupply2 | ok | PASS | 47 | 48 | #### Fan trays 49 | 50 | | Fan tray | Fans status | Result | 51 | | :-----: | :-----: | :-----: | 52 | | 1 | ok | PASS | 53 | | 2 | ok | PASS | 54 | | 3 | ok | PASS | 55 | | 4 | ok | PASS | 56 | 57 | 58 | ## Interfaces admin and operationnal status (switch2) 59 | 60 | ### interfaces connected to other devices 61 | 62 | | Interface | Admin status | Operationnal Status | Result | 63 | | :-----: | :-----: | :-----: | :-----: | 64 | | Ethernet2 | up | up | PASS 65 | | Ethernet24 | up | up | PASS 66 | ## LLDP topology (switch2) 67 | 68 | | Interface | Expected neighbor | Actual neighbor | Expected neighbor interface | Actual neighbor interface | Result | 69 | | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: | 70 | | Ethernet2 | switch1.lab.local | switch1.lab.local | Ethernet3 | Ethernet3 | PASS | 71 | | Ethernet24 | switch3.lab.local | switch3.lab.local | Ethernet24 | Ethernet24 | PASS | 72 | ## BGP (switch2) 73 | 74 | ### EBGP sessions state 75 | 76 | | EBGP Peer | Session state | Result | 77 | | :-----: | :-----: | :-----: | 78 | | 10.10.10.0 | Established | PASS | 79 | | 10.10.10.5 | Established | PASS | 80 | ### IPv4 prefixes sent to EBGP peer 81 | 82 | 83 | 84 | | EBGP Peer | IPv4 Prefixes sent | Result | 85 | | :-----: | :-----: | :-----: | 86 | | 10.10.10.0 | 5 | PASS | 87 | | 10.10.10.5 | 6 | PASS | 88 | ### IPv4 prefixes received from EBGP peer 89 | 90 | 91 | | EBGP Peer | IPv4 Prefixes received | Result | 92 | | :-----: | :-----: | :-----: | 93 | | 10.10.10.0 | 5 | PASS 94 | | 10.10.10.5 | 6 | PASS 95 | ## Routing table (switch2) 96 | 97 | | Destination (EBGP peer loopback) | via next hop | via interface | Result | 98 | | :-----: | :-----: | :-----: | :-----: | 99 | | 172.16.0.1/32 | 10.10.10.0 | Ethernet2 | PASS | 100 | | 172.16.0.3/32 | 10.10.10.5 | Ethernet24 | PASS | 101 | ## IP reachability (switch2) 102 | 103 | ### Ping EBGP peers from switch2 interfaces 104 | 105 | 106 | | source interface | IP source | IP destination (EBGP peer) | Result | 107 | | :-----: | :-----: | :-----: | :-----: | 108 | | Ethernet2 | 10.10.10.1 | 10.10.10.0 | PASS | 109 | | Ethernet24 | 10.10.10.4 | 10.10.10.5 | PASS | 110 | ### Ping EBGP peers loopback from switch2 interfaces 111 | 112 | | source interface | IP source | IP destination (EBGP peer loopback) | Result | 113 | | :-----: | :-----: | :-----: | :-----: | 114 | | Ethernet2 | 10.10.10.1 | 172.16.0.1 | PASS | 115 | | Ethernet24 | 10.10.10.4 | 172.16.0.3 | PASS | 116 | ### Ping EBGP peers loopback from switch2 loopback 117 | | IP source | IP destination (EBGP peer loopback) | Result | 118 | | :-----: | :-----: | :-----: | 119 | | 172.16.0.2 | 172.16.0.1 | PASS | 120 | | 172.16.0.2 | 172.16.0.3 | PASS | 121 | -------------------------------------------------------------------------------- /outputs/audit/fragments/switch3.md: -------------------------------------------------------------------------------- 1 | # Report for device switch3.lab.local 2 | 3 | ## Device details (switch3) 4 | 5 | ### HW model 6 | 7 | 8 | 9 | | Expected model | Actual model | Result | 10 | | :-----: | :-----: | :-----: | 11 | | DCS-7150S-64-CL-F | DCS-7150S-64-CL-F | PASS | 12 | 13 | ### SW version 14 | 15 | 16 | 17 | 18 | | Expected version | Actual version | Result | 19 | | :-----: | :-----: | :-----: | 20 | | 4.22.4M-2GB | 4.22.4M-2GB | PASS | 21 | 22 | ## Environment (switch3) 23 | 24 | ### Power 25 | 26 | | Power Supply | State | Result | 27 | | :-----: | :-----: | :-----: | 28 | | 1 | powerLoss | FAIL | 29 | | 2 | ok | PASS | 30 | 31 | ### Temperature 32 | 33 | 34 | 35 | | System temperature status| Result | 36 | | :-----: | :-----: | 37 | | temperatureOk | PASS | 38 | 39 | ### Cooling 40 | 41 | #### Power supplies 42 | 43 | | Power Supply | Fans status | Result | 44 | | :-----: | :-----: | :-----: | 45 | | PowerSupply1 | ok | PASS | 46 | | PowerSupply2 | ok | PASS | 47 | 48 | #### Fan trays 49 | 50 | | Fan tray | Fans status | Result | 51 | | :-----: | :-----: | :-----: | 52 | | 1 | ok | PASS | 53 | | 2 | ok | PASS | 54 | | 3 | ok | PASS | 55 | | 4 | ok | PASS | 56 | 57 | 58 | ## Interfaces admin and operationnal status (switch3) 59 | 60 | ### interfaces connected to other devices 61 | 62 | | Interface | Admin status | Operationnal Status | Result | 63 | | :-----: | :-----: | :-----: | :-----: | 64 | | Ethernet2 | up | up | PASS 65 | | Ethernet24 | up | up | PASS 66 | ## LLDP topology (switch3) 67 | 68 | | Interface | Expected neighbor | Actual neighbor | Expected neighbor interface | Actual neighbor interface | Result | 69 | | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: | 70 | | Ethernet2 | switch1.lab.local | switch1.lab.local | Ethernet4 | Ethernet4 | PASS | 71 | | Ethernet24 | switch2.lab.local | switch2.lab.local | Ethernet24 | Ethernet24 | PASS | 72 | ## BGP (switch3) 73 | 74 | ### EBGP sessions state 75 | 76 | | EBGP Peer | Session state | Result | 77 | | :-----: | :-----: | :-----: | 78 | | 10.10.10.2 | Established | PASS | 79 | | 10.10.10.4 | Established | PASS | 80 | ### IPv4 prefixes sent to EBGP peer 81 | 82 | 83 | 84 | | EBGP Peer | IPv4 Prefixes sent | Result | 85 | | :-----: | :-----: | :-----: | 86 | | 10.10.10.2 | 5 | PASS | 87 | | 10.10.10.4 | 6 | PASS | 88 | ### IPv4 prefixes received from EBGP peer 89 | 90 | 91 | | EBGP Peer | IPv4 Prefixes received | Result | 92 | | :-----: | :-----: | :-----: | 93 | | 10.10.10.2 | 6 | PASS 94 | | 10.10.10.4 | 6 | PASS 95 | ## Routing table (switch3) 96 | 97 | | Destination (EBGP peer loopback) | via next hop | via interface | Result | 98 | | :-----: | :-----: | :-----: | :-----: | 99 | | 172.16.0.1/32 | 10.10.10.2 | Ethernet2 | PASS | 100 | | 172.16.0.2/32 | 10.10.10.4 | Ethernet24 | PASS | 101 | ## IP reachability (switch3) 102 | 103 | ### Ping EBGP peers from switch3 interfaces 104 | 105 | 106 | | source interface | IP source | IP destination (EBGP peer) | Result | 107 | | :-----: | :-----: | :-----: | :-----: | 108 | | Ethernet2 | 10.10.10.3 | 10.10.10.2 | PASS | 109 | | Ethernet24 | 10.10.10.5 | 10.10.10.4 | PASS | 110 | ### Ping EBGP peers loopback from switch3 interfaces 111 | 112 | | source interface | IP source | IP destination (EBGP peer loopback) | Result | 113 | | :-----: | :-----: | :-----: | :-----: | 114 | | Ethernet2 | 10.10.10.3 | 172.16.0.1 | PASS | 115 | | Ethernet24 | 10.10.10.5 | 172.16.0.2 | PASS | 116 | ### Ping EBGP peers loopback from switch3 loopback 117 | | IP source | IP destination (EBGP peer loopback) | Result | 118 | | :-----: | :-----: | :-----: | 119 | | 172.16.0.3 | 172.16.0.1 | PASS | 120 | | 172.16.0.3 | 172.16.0.2 | PASS | 121 | -------------------------------------------------------------------------------- /outputs/audit/report.md: -------------------------------------------------------------------------------- 1 | Report generated with Ansible (Sun 3 May 2020 23:08:25 CEST) 2 | 3 | # Audit report structure 4 | [Report for device switch1.lab.local](#report-for-device-switch1lablocal) 5 | [Report for device switch2.lab.local](#report-for-device-switch2lablocal) 6 | [Report for device switch3.lab.local](#report-for-device-switch3lablocal) 7 | *************************************************** 8 | # Report for device switch1.lab.local 9 | 10 | ## Device details (switch1) 11 | 12 | ### HW model 13 | 14 | 15 | 16 | | Expected model | Actual model | Result | 17 | | :-----: | :-----: | :-----: | 18 | | DCS-7150S-64-CL-F | DCS-7150S-64-CL-F | PASS | 19 | 20 | ### SW version 21 | 22 | 23 | 24 | 25 | | Expected version | Actual version | Result | 26 | | :-----: | :-----: | :-----: | 27 | | 4.22.4M-2GB | 4.22.4M-2GB | PASS | 28 | 29 | ## Environment (switch1) 30 | 31 | ### Power 32 | 33 | | Power Supply | State | Result | 34 | | :-----: | :-----: | :-----: | 35 | | 1 | powerLoss | FAIL | 36 | | 2 | ok | PASS | 37 | 38 | ### Temperature 39 | 40 | 41 | 42 | | System temperature status| Result | 43 | | :-----: | :-----: | 44 | | temperatureOk | PASS | 45 | 46 | ### Cooling 47 | 48 | #### Power supplies 49 | 50 | | Power Supply | Fans status | Result | 51 | | :-----: | :-----: | :-----: | 52 | | PowerSupply1 | ok | PASS | 53 | | PowerSupply2 | ok | PASS | 54 | 55 | #### Fan trays 56 | 57 | | Fan tray | Fans status | Result | 58 | | :-----: | :-----: | :-----: | 59 | | 1 | ok | PASS | 60 | | 2 | ok | PASS | 61 | | 3 | ok | PASS | 62 | | 4 | ok | PASS | 63 | 64 | 65 | ## Interfaces admin and operationnal status (switch1) 66 | 67 | ### interfaces connected to other devices 68 | 69 | | Interface | Admin status | Operationnal Status | Result | 70 | | :-----: | :-----: | :-----: | :-----: | 71 | | Ethernet3 | up | up | PASS 72 | | Ethernet4 | up | up | PASS 73 | ## LLDP topology (switch1) 74 | 75 | | Interface | Expected neighbor | Actual neighbor | Expected neighbor interface | Actual neighbor interface | Result | 76 | | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: | 77 | | Ethernet3 | switch2.lab.local | switch2.lab.local | Ethernet2 | Ethernet2 | PASS | 78 | | Ethernet4 | switch3.lab.local | switch3.lab.local | Ethernet2 | Ethernet2 | PASS | 79 | ## BGP (switch1) 80 | 81 | ### EBGP sessions state 82 | 83 | | EBGP Peer | Session state | Result | 84 | | :-----: | :-----: | :-----: | 85 | | 10.10.10.1 | Established | PASS | 86 | | 10.10.10.3 | Established | PASS | 87 | ### IPv4 prefixes sent to EBGP peer 88 | 89 | 90 | 91 | | EBGP Peer | IPv4 Prefixes sent | Result | 92 | | :-----: | :-----: | :-----: | 93 | | 10.10.10.1 | 5 | PASS | 94 | | 10.10.10.3 | 6 | PASS | 95 | ### IPv4 prefixes received from EBGP peer 96 | 97 | 98 | | EBGP Peer | IPv4 Prefixes received | Result | 99 | | :-----: | :-----: | :-----: | 100 | | 10.10.10.1 | 5 | PASS 101 | | 10.10.10.3 | 5 | PASS 102 | ## Routing table (switch1) 103 | 104 | | Destination (EBGP peer loopback) | via next hop | via interface | Result | 105 | | :-----: | :-----: | :-----: | :-----: | 106 | | 172.16.0.2/32 | 10.10.10.1 | Ethernet3 | PASS | 107 | | 172.16.0.3/32 | 10.10.10.3 | Ethernet4 | PASS | 108 | ## IP reachability (switch1) 109 | 110 | ### Ping EBGP peers from switch1 interfaces 111 | 112 | 113 | | source interface | IP source | IP destination (EBGP peer) | Result | 114 | | :-----: | :-----: | :-----: | :-----: | 115 | | Ethernet3 | 10.10.10.0 | 10.10.10.1 | PASS | 116 | | Ethernet4 | 10.10.10.2 | 10.10.10.3 | PASS | 117 | ### Ping EBGP peers loopback from switch1 interfaces 118 | 119 | | source interface | IP source | IP destination (EBGP peer loopback) | Result | 120 | | :-----: | :-----: | :-----: | :-----: | 121 | | Ethernet3 | 10.10.10.0 | 172.16.0.2 | PASS | 122 | | Ethernet4 | 10.10.10.2 | 172.16.0.3 | PASS | 123 | ### Ping EBGP peers loopback from switch1 loopback 124 | | IP source | IP destination (EBGP peer loopback) | Result | 125 | | :-----: | :-----: | :-----: | 126 | | 172.16.0.1 | 172.16.0.2 | PASS | 127 | | 172.16.0.1 | 172.16.0.3 | PASS | 128 | *************************************************** 129 | # Report for device switch2.lab.local 130 | 131 | ## Device details (switch2) 132 | 133 | ### HW model 134 | 135 | 136 | 137 | | Expected model | Actual model | Result | 138 | | :-----: | :-----: | :-----: | 139 | | DCS-7150S-64-CL-F | DCS-7150S-64-CL-F | PASS | 140 | 141 | ### SW version 142 | 143 | 144 | 145 | 146 | | Expected version | Actual version | Result | 147 | | :-----: | :-----: | :-----: | 148 | | 4.22.4M-2GB | 4.22.4M-2GB | PASS | 149 | 150 | ## Environment (switch2) 151 | 152 | ### Power 153 | 154 | | Power Supply | State | Result | 155 | | :-----: | :-----: | :-----: | 156 | | 1 | powerLoss | FAIL | 157 | | 2 | ok | PASS | 158 | 159 | ### Temperature 160 | 161 | 162 | 163 | | System temperature status| Result | 164 | | :-----: | :-----: | 165 | | temperatureOk | PASS | 166 | 167 | ### Cooling 168 | 169 | #### Power supplies 170 | 171 | | Power Supply | Fans status | Result | 172 | | :-----: | :-----: | :-----: | 173 | | PowerSupply1 | ok | PASS | 174 | | PowerSupply2 | ok | PASS | 175 | 176 | #### Fan trays 177 | 178 | | Fan tray | Fans status | Result | 179 | | :-----: | :-----: | :-----: | 180 | | 1 | ok | PASS | 181 | | 2 | ok | PASS | 182 | | 3 | ok | PASS | 183 | | 4 | ok | PASS | 184 | 185 | 186 | ## Interfaces admin and operationnal status (switch2) 187 | 188 | ### interfaces connected to other devices 189 | 190 | | Interface | Admin status | Operationnal Status | Result | 191 | | :-----: | :-----: | :-----: | :-----: | 192 | | Ethernet2 | up | up | PASS 193 | | Ethernet24 | up | up | PASS 194 | ## LLDP topology (switch2) 195 | 196 | | Interface | Expected neighbor | Actual neighbor | Expected neighbor interface | Actual neighbor interface | Result | 197 | | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: | 198 | | Ethernet2 | switch1.lab.local | switch1.lab.local | Ethernet3 | Ethernet3 | PASS | 199 | | Ethernet24 | switch3.lab.local | switch3.lab.local | Ethernet24 | Ethernet24 | PASS | 200 | ## BGP (switch2) 201 | 202 | ### EBGP sessions state 203 | 204 | | EBGP Peer | Session state | Result | 205 | | :-----: | :-----: | :-----: | 206 | | 10.10.10.0 | Established | PASS | 207 | | 10.10.10.5 | Established | PASS | 208 | ### IPv4 prefixes sent to EBGP peer 209 | 210 | 211 | 212 | | EBGP Peer | IPv4 Prefixes sent | Result | 213 | | :-----: | :-----: | :-----: | 214 | | 10.10.10.0 | 5 | PASS | 215 | | 10.10.10.5 | 6 | PASS | 216 | ### IPv4 prefixes received from EBGP peer 217 | 218 | 219 | | EBGP Peer | IPv4 Prefixes received | Result | 220 | | :-----: | :-----: | :-----: | 221 | | 10.10.10.0 | 5 | PASS 222 | | 10.10.10.5 | 6 | PASS 223 | ## Routing table (switch2) 224 | 225 | | Destination (EBGP peer loopback) | via next hop | via interface | Result | 226 | | :-----: | :-----: | :-----: | :-----: | 227 | | 172.16.0.1/32 | 10.10.10.0 | Ethernet2 | PASS | 228 | | 172.16.0.3/32 | 10.10.10.5 | Ethernet24 | PASS | 229 | ## IP reachability (switch2) 230 | 231 | ### Ping EBGP peers from switch2 interfaces 232 | 233 | 234 | | source interface | IP source | IP destination (EBGP peer) | Result | 235 | | :-----: | :-----: | :-----: | :-----: | 236 | | Ethernet2 | 10.10.10.1 | 10.10.10.0 | PASS | 237 | | Ethernet24 | 10.10.10.4 | 10.10.10.5 | PASS | 238 | ### Ping EBGP peers loopback from switch2 interfaces 239 | 240 | | source interface | IP source | IP destination (EBGP peer loopback) | Result | 241 | | :-----: | :-----: | :-----: | :-----: | 242 | | Ethernet2 | 10.10.10.1 | 172.16.0.1 | PASS | 243 | | Ethernet24 | 10.10.10.4 | 172.16.0.3 | PASS | 244 | ### Ping EBGP peers loopback from switch2 loopback 245 | | IP source | IP destination (EBGP peer loopback) | Result | 246 | | :-----: | :-----: | :-----: | 247 | | 172.16.0.2 | 172.16.0.1 | PASS | 248 | | 172.16.0.2 | 172.16.0.3 | PASS | 249 | *************************************************** 250 | # Report for device switch3.lab.local 251 | 252 | ## Device details (switch3) 253 | 254 | ### HW model 255 | 256 | 257 | 258 | | Expected model | Actual model | Result | 259 | | :-----: | :-----: | :-----: | 260 | | DCS-7150S-64-CL-F | DCS-7150S-64-CL-F | PASS | 261 | 262 | ### SW version 263 | 264 | 265 | 266 | 267 | | Expected version | Actual version | Result | 268 | | :-----: | :-----: | :-----: | 269 | | 4.22.4M-2GB | 4.22.4M-2GB | PASS | 270 | 271 | ## Environment (switch3) 272 | 273 | ### Power 274 | 275 | | Power Supply | State | Result | 276 | | :-----: | :-----: | :-----: | 277 | | 1 | powerLoss | FAIL | 278 | | 2 | ok | PASS | 279 | 280 | ### Temperature 281 | 282 | 283 | 284 | | System temperature status| Result | 285 | | :-----: | :-----: | 286 | | temperatureOk | PASS | 287 | 288 | ### Cooling 289 | 290 | #### Power supplies 291 | 292 | | Power Supply | Fans status | Result | 293 | | :-----: | :-----: | :-----: | 294 | | PowerSupply1 | ok | PASS | 295 | | PowerSupply2 | ok | PASS | 296 | 297 | #### Fan trays 298 | 299 | | Fan tray | Fans status | Result | 300 | | :-----: | :-----: | :-----: | 301 | | 1 | ok | PASS | 302 | | 2 | ok | PASS | 303 | | 3 | ok | PASS | 304 | | 4 | ok | PASS | 305 | 306 | 307 | ## Interfaces admin and operationnal status (switch3) 308 | 309 | ### interfaces connected to other devices 310 | 311 | | Interface | Admin status | Operationnal Status | Result | 312 | | :-----: | :-----: | :-----: | :-----: | 313 | | Ethernet2 | up | up | PASS 314 | | Ethernet24 | up | up | PASS 315 | ## LLDP topology (switch3) 316 | 317 | | Interface | Expected neighbor | Actual neighbor | Expected neighbor interface | Actual neighbor interface | Result | 318 | | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: | 319 | | Ethernet2 | switch1.lab.local | switch1.lab.local | Ethernet4 | Ethernet4 | PASS | 320 | | Ethernet24 | switch2.lab.local | switch2.lab.local | Ethernet24 | Ethernet24 | PASS | 321 | ## BGP (switch3) 322 | 323 | ### EBGP sessions state 324 | 325 | | EBGP Peer | Session state | Result | 326 | | :-----: | :-----: | :-----: | 327 | | 10.10.10.2 | Established | PASS | 328 | | 10.10.10.4 | Established | PASS | 329 | ### IPv4 prefixes sent to EBGP peer 330 | 331 | 332 | 333 | | EBGP Peer | IPv4 Prefixes sent | Result | 334 | | :-----: | :-----: | :-----: | 335 | | 10.10.10.2 | 5 | PASS | 336 | | 10.10.10.4 | 6 | PASS | 337 | ### IPv4 prefixes received from EBGP peer 338 | 339 | 340 | | EBGP Peer | IPv4 Prefixes received | Result | 341 | | :-----: | :-----: | :-----: | 342 | | 10.10.10.2 | 6 | PASS 343 | | 10.10.10.4 | 6 | PASS 344 | ## Routing table (switch3) 345 | 346 | | Destination (EBGP peer loopback) | via next hop | via interface | Result | 347 | | :-----: | :-----: | :-----: | :-----: | 348 | | 172.16.0.1/32 | 10.10.10.2 | Ethernet2 | PASS | 349 | | 172.16.0.2/32 | 10.10.10.4 | Ethernet24 | PASS | 350 | ## IP reachability (switch3) 351 | 352 | ### Ping EBGP peers from switch3 interfaces 353 | 354 | 355 | | source interface | IP source | IP destination (EBGP peer) | Result | 356 | | :-----: | :-----: | :-----: | :-----: | 357 | | Ethernet2 | 10.10.10.3 | 10.10.10.2 | PASS | 358 | | Ethernet24 | 10.10.10.5 | 10.10.10.4 | PASS | 359 | ### Ping EBGP peers loopback from switch3 interfaces 360 | 361 | | source interface | IP source | IP destination (EBGP peer loopback) | Result | 362 | | :-----: | :-----: | :-----: | :-----: | 363 | | Ethernet2 | 10.10.10.3 | 172.16.0.1 | PASS | 364 | | Ethernet24 | 10.10.10.5 | 172.16.0.2 | PASS | 365 | ### Ping EBGP peers loopback from switch3 loopback 366 | | IP source | IP destination (EBGP peer loopback) | Result | 367 | | :-----: | :-----: | :-----: | 368 | | 172.16.0.3 | 172.16.0.1 | PASS | 369 | | 172.16.0.3 | 172.16.0.2 | PASS | 370 | -------------------------------------------------------------------------------- /outputs/backup/switch1_config.2020-05-03@23:14:45: -------------------------------------------------------------------------------- 1 | ! Command: show running-config 2 | ! device: switch1 (DCS-7150S-64-CL, EOS-4.22.4M-2GB) 3 | ! 4 | ! boot system flash:/EOS.swi 5 | ! 6 | daemon TerminAttr 7 | exec /usr/bin/TerminAttr -ingestgrpcurl=10.83.29.224:9910 -taillogs -ingestauth=key,IngestKey -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -ingestexclude=/Sysdb/cell/1/agent,/Sysdb/cell/2/agent 8 | no shutdown 9 | ! 10 | load-interval default 5 11 | ! 12 | transceiver qsfp default-mode 4x10G 13 | ! 14 | queue-monitor length 15 | ! 16 | logging host 10.83.28.52 17 | ! 18 | hostname switch1 19 | ip name-server vrf default 10.83.28.52 20 | ip name-server vrf default 10.83.29.222 21 | ip domain-name lab.local 22 | ! 23 | ntp server 10.83.28.52 24 | ! 25 | snmp-server community private rw 26 | snmp-server community public ro 27 | ! 28 | spanning-tree mode mstp 29 | ! 30 | aaa authorization exec default local 31 | ! 32 | no aaa root 33 | aaa authentication policy local allow-nopassword-remote-login 34 | ! 35 | username admin privilege 15 role network-admin nopassword 36 | username ansible privilege 15 secret sha512 $6$GGTTCTG1O8YNX8GC$MRuKQPuDPVCNO47f1YC.j5OUkPN0devVfRMhShSVQFAocI5p8uKqbrrGyxQfcu28XiPkLMXPduGSZbI.TH3IQ/ 37 | username cvp-infra privilege 15 secret sha512 $6$.I7/ZR/zlLIUv8fr$vR/JvLTbq5amMt6Y1SE4CKlPDv/AzJYlFYHkUZ17BDovm0Oi4aLdBULe1EmZ0Y9xKjVLMKpxCSKmlrAioDxbQ0 38 | username switch-infra privilege 15 nopassword 39 | username telemetry secret 5 $1$7ksxaeUt$.JJMVbNtjZVxakZqvo0dy1 40 | ! 41 | interface Ethernet1 42 | shutdown 43 | ! 44 | interface Ethernet2 45 | shutdown 46 | ! 47 | interface Ethernet3 48 | description "switch2 **** Ethernet2" 49 | no switchport 50 | ip address 10.10.10.0/31 51 | ! 52 | interface Ethernet4 53 | description "switch3 **** Ethernet2" 54 | no switchport 55 | ip address 10.10.10.2/31 56 | ! 57 | interface Ethernet5 58 | shutdown 59 | ! 60 | interface Ethernet6 61 | shutdown 62 | ! 63 | interface Ethernet7 64 | shutdown 65 | ! 66 | interface Ethernet8 67 | shutdown 68 | ! 69 | interface Ethernet9 70 | shutdown 71 | ! 72 | interface Ethernet10 73 | shutdown 74 | ! 75 | interface Ethernet11 76 | shutdown 77 | ! 78 | interface Ethernet12 79 | shutdown 80 | ! 81 | interface Ethernet13 82 | shutdown 83 | ! 84 | interface Ethernet14 85 | shutdown 86 | ! 87 | interface Ethernet15 88 | shutdown 89 | ! 90 | interface Ethernet16 91 | shutdown 92 | ! 93 | interface Ethernet17 94 | shutdown 95 | ! 96 | interface Ethernet18 97 | shutdown 98 | ! 99 | interface Ethernet19 100 | shutdown 101 | ! 102 | interface Ethernet20 103 | shutdown 104 | ! 105 | interface Ethernet21 106 | shutdown 107 | ! 108 | interface Ethernet22 109 | shutdown 110 | ! 111 | interface Ethernet23 112 | shutdown 113 | ! 114 | interface Ethernet24 115 | shutdown 116 | ! 117 | interface Ethernet25 118 | shutdown 119 | ! 120 | interface Ethernet26 121 | shutdown 122 | ! 123 | interface Ethernet27 124 | shutdown 125 | ! 126 | interface Ethernet28 127 | shutdown 128 | ! 129 | interface Ethernet29 130 | shutdown 131 | ! 132 | interface Ethernet30 133 | shutdown 134 | ! 135 | interface Ethernet31 136 | shutdown 137 | ! 138 | interface Ethernet32 139 | shutdown 140 | ! 141 | interface Ethernet33 142 | shutdown 143 | ! 144 | interface Ethernet34 145 | shutdown 146 | ! 147 | interface Ethernet35 148 | shutdown 149 | ! 150 | interface Ethernet36 151 | shutdown 152 | ! 153 | interface Ethernet37 154 | shutdown 155 | ! 156 | interface Ethernet38 157 | shutdown 158 | ! 159 | interface Ethernet39 160 | shutdown 161 | ! 162 | interface Ethernet40 163 | shutdown 164 | ! 165 | interface Ethernet41 166 | shutdown 167 | ! 168 | interface Ethernet42 169 | shutdown 170 | ! 171 | interface Ethernet43 172 | shutdown 173 | ! 174 | interface Ethernet44 175 | shutdown 176 | ! 177 | interface Ethernet45 178 | shutdown 179 | ! 180 | interface Ethernet46 181 | shutdown 182 | ! 183 | interface Ethernet47 184 | shutdown 185 | ! 186 | interface Ethernet48 187 | shutdown 188 | ! 189 | interface Ethernet49/1 190 | shutdown 191 | ! 192 | interface Ethernet49/2 193 | shutdown 194 | ! 195 | interface Ethernet49/3 196 | shutdown 197 | ! 198 | interface Ethernet49/4 199 | shutdown 200 | ! 201 | interface Ethernet50/1 202 | shutdown 203 | ! 204 | interface Ethernet50/2 205 | shutdown 206 | ! 207 | interface Ethernet50/3 208 | shutdown 209 | ! 210 | interface Ethernet50/4 211 | shutdown 212 | ! 213 | interface Ethernet51/1 214 | shutdown 215 | ! 216 | interface Ethernet51/2 217 | shutdown 218 | ! 219 | interface Ethernet51/3 220 | shutdown 221 | ! 222 | interface Ethernet51/4 223 | shutdown 224 | ! 225 | interface Ethernet52/1 226 | shutdown 227 | ! 228 | interface Ethernet52/2 229 | shutdown 230 | ! 231 | interface Ethernet52/3 232 | shutdown 233 | ! 234 | interface Ethernet52/4 235 | shutdown 236 | ! 237 | interface Loopback0 238 | ip address 172.16.0.1/32 239 | ! 240 | interface Management1 241 | ip address 10.83.28.123/22 242 | ! 243 | ip route 0.0.0.0/0 10.83.28.1 244 | ! 245 | ip routing 246 | ! 247 | router bgp 65001 248 | neighbor 10.10.10.1 remote-as 65002 249 | neighbor 10.10.10.1 maximum-routes 12000 250 | neighbor 10.10.10.3 remote-as 65003 251 | neighbor 10.10.10.3 maximum-routes 12000 252 | redistribute connected 253 | ! 254 | management api http-commands 255 | protocol http 256 | no shutdown 257 | ! 258 | end -------------------------------------------------------------------------------- /outputs/backup/switch2_config.2020-05-03@23:14:45: -------------------------------------------------------------------------------- 1 | ! Command: show running-config 2 | ! device: switch2 (DCS-7150S-64-CL, EOS-4.22.4M-2GB) 3 | ! 4 | ! boot system flash:/EOS.swi 5 | ! 6 | daemon TerminAttr 7 | exec /usr/bin/TerminAttr -ingestgrpcurl=10.83.29.224:9910 -taillogs -ingestauth=key,IngestKey -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -ingestexclude=/Sysdb/cell/1/agent,/Sysdb/cell/2/agent 8 | no shutdown 9 | ! 10 | load-interval default 5 11 | ! 12 | transceiver qsfp default-mode 4x10G 13 | ! 14 | queue-monitor length 15 | ! 16 | logging host 10.83.28.52 17 | ! 18 | hostname switch2 19 | ip name-server vrf default 10.83.28.52 20 | ip name-server vrf default 10.83.29.222 21 | ip domain-name lab.local 22 | ! 23 | ntp server 10.83.28.52 24 | ! 25 | snmp-server community public ro 26 | ! 27 | spanning-tree mode mstp 28 | ! 29 | aaa authorization exec default local 30 | ! 31 | no aaa root 32 | aaa authentication policy local allow-nopassword-remote-login 33 | ! 34 | username admin privilege 15 role network-admin nopassword 35 | username ansible privilege 15 secret sha512 $6$rQIOCEbDoOucIhgR$8dlRqsDxQYo.VxUWhBJCZaL/cGCLyI1uxocnyNTZLvAhmjjDI7d1YT0LhSgLsZeHiVJJesAoyOtpmLH7kqKDy1 36 | username telemetry secret 5 $1$aVYVFaqH$W8oKA8utuEKVf8wcB1SLz. 37 | ! 38 | interface Ethernet1 39 | shutdown 40 | ! 41 | interface Ethernet2 42 | description "switch1 **** Ethernet3" 43 | no switchport 44 | ip address 10.10.10.1/31 45 | ! 46 | interface Ethernet3 47 | shutdown 48 | ! 49 | interface Ethernet4 50 | shutdown 51 | ! 52 | interface Ethernet5 53 | shutdown 54 | ! 55 | interface Ethernet6 56 | shutdown 57 | ! 58 | interface Ethernet7 59 | shutdown 60 | ! 61 | interface Ethernet8 62 | shutdown 63 | ! 64 | interface Ethernet9 65 | shutdown 66 | ! 67 | interface Ethernet10 68 | shutdown 69 | ! 70 | interface Ethernet11 71 | shutdown 72 | ! 73 | interface Ethernet12 74 | shutdown 75 | ! 76 | interface Ethernet13 77 | shutdown 78 | ! 79 | interface Ethernet14 80 | shutdown 81 | ! 82 | interface Ethernet15 83 | shutdown 84 | ! 85 | interface Ethernet16 86 | shutdown 87 | ! 88 | interface Ethernet17 89 | shutdown 90 | ! 91 | interface Ethernet18 92 | shutdown 93 | ! 94 | interface Ethernet19 95 | shutdown 96 | ! 97 | interface Ethernet20 98 | shutdown 99 | ! 100 | interface Ethernet21 101 | shutdown 102 | ! 103 | interface Ethernet22 104 | shutdown 105 | ! 106 | interface Ethernet23 107 | shutdown 108 | ! 109 | interface Ethernet24 110 | description "switch3 **** Ethernet24" 111 | no switchport 112 | ip address 10.10.10.4/31 113 | ! 114 | interface Ethernet25 115 | shutdown 116 | ! 117 | interface Ethernet26 118 | shutdown 119 | ! 120 | interface Ethernet27 121 | shutdown 122 | ! 123 | interface Ethernet28 124 | shutdown 125 | ! 126 | interface Ethernet29 127 | shutdown 128 | ! 129 | interface Ethernet30 130 | shutdown 131 | ! 132 | interface Ethernet31 133 | shutdown 134 | ! 135 | interface Ethernet32 136 | shutdown 137 | ! 138 | interface Ethernet33 139 | shutdown 140 | ! 141 | interface Ethernet34 142 | shutdown 143 | ! 144 | interface Ethernet35 145 | shutdown 146 | ! 147 | interface Ethernet36 148 | shutdown 149 | ! 150 | interface Ethernet37 151 | shutdown 152 | ! 153 | interface Ethernet38 154 | shutdown 155 | ! 156 | interface Ethernet39 157 | shutdown 158 | ! 159 | interface Ethernet40 160 | shutdown 161 | ! 162 | interface Ethernet41 163 | shutdown 164 | ! 165 | interface Ethernet42 166 | shutdown 167 | ! 168 | interface Ethernet43 169 | shutdown 170 | ! 171 | interface Ethernet44 172 | shutdown 173 | ! 174 | interface Ethernet45 175 | shutdown 176 | ! 177 | interface Ethernet46 178 | shutdown 179 | ! 180 | interface Ethernet47 181 | shutdown 182 | ! 183 | interface Ethernet48 184 | shutdown 185 | ! 186 | interface Ethernet49/1 187 | shutdown 188 | ! 189 | interface Ethernet49/2 190 | shutdown 191 | ! 192 | interface Ethernet49/3 193 | shutdown 194 | ! 195 | interface Ethernet49/4 196 | shutdown 197 | ! 198 | interface Ethernet50/1 199 | shutdown 200 | ! 201 | interface Ethernet50/2 202 | shutdown 203 | ! 204 | interface Ethernet50/3 205 | shutdown 206 | ! 207 | interface Ethernet50/4 208 | shutdown 209 | ! 210 | interface Ethernet51/1 211 | shutdown 212 | ! 213 | interface Ethernet51/2 214 | shutdown 215 | ! 216 | interface Ethernet51/3 217 | shutdown 218 | ! 219 | interface Ethernet51/4 220 | shutdown 221 | ! 222 | interface Ethernet52/1 223 | shutdown 224 | ! 225 | interface Ethernet52/2 226 | shutdown 227 | ! 228 | interface Ethernet52/3 229 | shutdown 230 | ! 231 | interface Ethernet52/4 232 | shutdown 233 | ! 234 | interface Loopback0 235 | ip address 172.16.0.2/32 236 | ! 237 | interface Management1 238 | ip address 10.83.28.124/22 239 | ! 240 | ip route 0.0.0.0/0 10.83.28.1 241 | ! 242 | ip routing 243 | ! 244 | router bgp 65002 245 | neighbor 10.10.10.0 remote-as 65001 246 | neighbor 10.10.10.0 maximum-routes 12000 247 | neighbor 10.10.10.5 remote-as 65003 248 | neighbor 10.10.10.5 maximum-routes 12000 249 | redistribute connected 250 | ! 251 | management api http-commands 252 | protocol http 253 | no shutdown 254 | ! 255 | end -------------------------------------------------------------------------------- /outputs/backup/switch3_config.2020-05-03@23:14:44: -------------------------------------------------------------------------------- 1 | ! Command: show running-config 2 | ! device: switch3 (DCS-7150S-64-CL, EOS-4.22.4M-2GB) 3 | ! 4 | ! boot system flash:/EOS.swi 5 | ! 6 | daemon TerminAttr 7 | exec /usr/bin/TerminAttr -ingestgrpcurl=10.83.29.224:9910 -taillogs -ingestauth=key,IngestKey -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -ingestexclude=/Sysdb/cell/1/agent,/Sysdb/cell/2/agent 8 | no shutdown 9 | ! 10 | load-interval default 5 11 | ! 12 | transceiver qsfp default-mode 4x10G 13 | ! 14 | queue-monitor length 15 | ! 16 | logging host 10.83.28.52 17 | ! 18 | hostname switch3 19 | ip name-server vrf default 10.83.28.52 20 | ip name-server vrf default 10.83.29.222 21 | ip domain-name lab.local 22 | ! 23 | ntp server 10.83.28.52 24 | ! 25 | snmp-server community private rw 26 | snmp-server community public ro 27 | ! 28 | spanning-tree mode mstp 29 | ! 30 | aaa authorization exec default local 31 | ! 32 | no aaa root 33 | aaa authentication policy local allow-nopassword-remote-login 34 | ! 35 | username admin privilege 15 role network-admin nopassword 36 | username ansible privilege 15 secret sha512 $6$e2ytkIy/vxmv9.Rg$fEiDvI7f90rLam8eF9kkiakgBAkj7EnLm3.g.YmWaOoaB3tTrcUih2uzz9H/bNeSKifMZYRF0zUlEE5BVO8Nn0 37 | username cvp-infra privilege 15 secret sha512 $6$.I7/ZR/zlLIUv8fr$vR/JvLTbq5amMt6Y1SE4CKlPDv/AzJYlFYHkUZ17BDovm0Oi4aLdBULe1EmZ0Y9xKjVLMKpxCSKmlrAioDxbQ0 38 | username switch-infra privilege 15 nopassword 39 | username telemetry secret 5 $1$7ksxaeUt$.JJMVbNtjZVxakZqvo0dy1 40 | ! 41 | interface Ethernet1 42 | shutdown 43 | ! 44 | interface Ethernet2 45 | description "switch1 **** Ethernet4" 46 | no switchport 47 | ip address 10.10.10.3/31 48 | ! 49 | interface Ethernet3 50 | shutdown 51 | ! 52 | interface Ethernet4 53 | shutdown 54 | ! 55 | interface Ethernet5 56 | shutdown 57 | ! 58 | interface Ethernet6 59 | shutdown 60 | ! 61 | interface Ethernet7 62 | shutdown 63 | ! 64 | interface Ethernet8 65 | shutdown 66 | ! 67 | interface Ethernet9 68 | shutdown 69 | ! 70 | interface Ethernet10 71 | shutdown 72 | ! 73 | interface Ethernet11 74 | shutdown 75 | ! 76 | interface Ethernet12 77 | shutdown 78 | ! 79 | interface Ethernet13 80 | shutdown 81 | ! 82 | interface Ethernet14 83 | shutdown 84 | ! 85 | interface Ethernet15 86 | shutdown 87 | ! 88 | interface Ethernet16 89 | shutdown 90 | ! 91 | interface Ethernet17 92 | shutdown 93 | ! 94 | interface Ethernet18 95 | shutdown 96 | ! 97 | interface Ethernet19 98 | shutdown 99 | ! 100 | interface Ethernet20 101 | shutdown 102 | ! 103 | interface Ethernet21 104 | shutdown 105 | ! 106 | interface Ethernet22 107 | shutdown 108 | ! 109 | interface Ethernet23 110 | shutdown 111 | ! 112 | interface Ethernet24 113 | description "switch2 **** Ethernet24" 114 | no switchport 115 | ip address 10.10.10.5/31 116 | ! 117 | interface Ethernet25 118 | shutdown 119 | ! 120 | interface Ethernet26 121 | shutdown 122 | ! 123 | interface Ethernet27 124 | shutdown 125 | ! 126 | interface Ethernet28 127 | shutdown 128 | ! 129 | interface Ethernet29 130 | shutdown 131 | ! 132 | interface Ethernet30 133 | shutdown 134 | ! 135 | interface Ethernet31 136 | shutdown 137 | ! 138 | interface Ethernet32 139 | shutdown 140 | ! 141 | interface Ethernet33 142 | shutdown 143 | ! 144 | interface Ethernet34 145 | shutdown 146 | ! 147 | interface Ethernet35 148 | shutdown 149 | ! 150 | interface Ethernet36 151 | shutdown 152 | ! 153 | interface Ethernet37 154 | shutdown 155 | ! 156 | interface Ethernet38 157 | shutdown 158 | ! 159 | interface Ethernet39 160 | shutdown 161 | ! 162 | interface Ethernet40 163 | shutdown 164 | ! 165 | interface Ethernet41 166 | shutdown 167 | ! 168 | interface Ethernet42 169 | shutdown 170 | ! 171 | interface Ethernet43 172 | shutdown 173 | ! 174 | interface Ethernet44 175 | shutdown 176 | ! 177 | interface Ethernet45 178 | shutdown 179 | ! 180 | interface Ethernet46 181 | shutdown 182 | ! 183 | interface Ethernet47 184 | shutdown 185 | ! 186 | interface Ethernet48 187 | shutdown 188 | ! 189 | interface Ethernet49/1 190 | shutdown 191 | ! 192 | interface Ethernet49/2 193 | shutdown 194 | ! 195 | interface Ethernet49/3 196 | shutdown 197 | ! 198 | interface Ethernet49/4 199 | shutdown 200 | ! 201 | interface Ethernet50/1 202 | shutdown 203 | ! 204 | interface Ethernet50/2 205 | shutdown 206 | ! 207 | interface Ethernet50/3 208 | shutdown 209 | ! 210 | interface Ethernet50/4 211 | shutdown 212 | ! 213 | interface Ethernet51/1 214 | shutdown 215 | ! 216 | interface Ethernet51/2 217 | shutdown 218 | ! 219 | interface Ethernet51/3 220 | shutdown 221 | ! 222 | interface Ethernet51/4 223 | shutdown 224 | ! 225 | interface Ethernet52/1 226 | shutdown 227 | ! 228 | interface Ethernet52/2 229 | shutdown 230 | ! 231 | interface Ethernet52/3 232 | shutdown 233 | ! 234 | interface Ethernet52/4 235 | shutdown 236 | ! 237 | interface Loopback0 238 | ip address 172.16.0.3/32 239 | ! 240 | interface Management1 241 | ip address 10.83.28.125/22 242 | ! 243 | ip route 0.0.0.0/0 10.83.28.1 244 | ! 245 | ip routing 246 | ! 247 | router bgp 65003 248 | neighbor 10.10.10.2 remote-as 65001 249 | neighbor 10.10.10.2 maximum-routes 12000 250 | neighbor 10.10.10.4 remote-as 65002 251 | neighbor 10.10.10.4 maximum-routes 12000 252 | redistribute connected 253 | ! 254 | management api http-commands 255 | protocol http 256 | no shutdown 257 | ! 258 | end -------------------------------------------------------------------------------- /outputs/cli/switch1/show interfaces description.txt: -------------------------------------------------------------------------------- 1 | Interface Status Protocol Description 2 | Et1 admin down down 3 | Et2 admin down down 4 | Et3 up up "switch2 **** Ethernet2" 5 | Et4 up up "switch3 **** Ethernet2" 6 | Et5 admin down down 7 | Et6 admin down down 8 | Et7 admin down down 9 | Et8 up up "testing ansible module eos_config" 10 | Et9 admin down notpresent 11 | Et10 admin down notpresent 12 | Et11 admin down notpresent 13 | Et12 admin down notpresent 14 | Et13 admin down notpresent 15 | Et14 admin down notpresent 16 | Et15 admin down down 17 | Et16 admin down notpresent 18 | Et17 admin down notpresent 19 | Et18 admin down notpresent 20 | Et19 admin down notpresent 21 | Et20 admin down notpresent 22 | Et21 admin down notpresent 23 | Et22 admin down notpresent 24 | Et23 admin down notpresent 25 | Et24 admin down down 26 | Et25 admin down notpresent 27 | Et26 admin down notpresent 28 | Et27 admin down notpresent 29 | Et28 admin down notpresent 30 | Et29 admin down notpresent 31 | Et30 admin down notpresent 32 | Et31 admin down notpresent 33 | Et32 admin down notpresent 34 | Et33 admin down notpresent 35 | Et34 admin down notpresent 36 | Et35 admin down notpresent 37 | Et36 admin down notpresent 38 | Et37 admin down notpresent 39 | Et38 admin down notpresent 40 | Et39 admin down notpresent 41 | Et40 admin down notpresent 42 | Et41 admin down notpresent 43 | Et42 admin down notpresent 44 | Et43 admin down notpresent 45 | Et44 admin down notpresent 46 | Et45 admin down notpresent 47 | Et46 admin down notpresent 48 | Et47 admin down down 49 | Et48 admin down down 50 | Et49/1 admin down notpresent 51 | Et49/2 admin down notpresent 52 | Et49/3 admin down notpresent 53 | Et49/4 admin down notpresent 54 | Et50/1 admin down notpresent 55 | Et50/2 admin down notpresent 56 | Et50/3 admin down notpresent 57 | Et50/4 admin down notpresent 58 | Et51/1 admin down notpresent 59 | Et51/2 admin down notpresent 60 | Et51/3 admin down notpresent 61 | Et51/4 admin down notpresent 62 | Et52/1 admin down notpresent 63 | Et52/2 admin down notpresent 64 | Et52/3 admin down notpresent 65 | Et52/4 admin down notpresent 66 | Lo0 up up 67 | Ma1 up up -------------------------------------------------------------------------------- /outputs/cli/switch1/show ip bgp summary.txt: -------------------------------------------------------------------------------- 1 | BGP summary information for VRF default 2 | Router identifier 172.16.0.1, local AS number 65001 3 | Neighbor Status Codes: m - Under maintenance 4 | Neighbor V AS MsgRcvd MsgSent InQ OutQ Up/Down State PfxRcd PfxAcc 5 | 10.10.10.1 4 65002 2873 2875 0 0 1d05h Estab 5 5 6 | 10.10.10.3 4 65003 2877 2888 0 0 1d23h Estab 5 5 -------------------------------------------------------------------------------- /outputs/cli/switch1/show ip interface brief.txt: -------------------------------------------------------------------------------- 1 | Address 2 | Interface IP Address Status Protocol MTU Owner 3 | --------------- ------------------- ---------- ------------- ---------- ------- 4 | Ethernet3 10.10.10.0/31 up up 1500 5 | Ethernet4 10.10.10.2/31 up up 1500 6 | Loopback0 172.16.0.1/32 up up 65535 7 | Management1 10.83.28.123/22 up up 1500 -------------------------------------------------------------------------------- /outputs/cli/switch1/show ip route.txt: -------------------------------------------------------------------------------- 1 | VRF: default 2 | Codes: C - connected, S - static, K - kernel, 3 | O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1, 4 | E2 - OSPF external type 2, N1 - OSPF NSSA external type 1, 5 | N2 - OSPF NSSA external type2, B - BGP, B I - iBGP, B E - eBGP, 6 | R - RIP, I L1 - IS-IS level 1, I L2 - IS-IS level 2, 7 | O3 - OSPFv3, A B - BGP Aggregate, A O - OSPF Summary, 8 | NG - Nexthop Group Static Route, V - VXLAN Control Service, 9 | DH - DHCP client installed default route, M - Martian, 10 | DP - Dynamic Policy Route, L - VRF Leaked 11 | 12 | Gateway of last resort: 13 | S 0.0.0.0/0 [1/0] via 10.83.28.1, Management1 14 | 15 | C 10.10.10.0/31 is directly connected, Ethernet3 16 | C 10.10.10.2/31 is directly connected, Ethernet4 17 | B E 10.10.10.4/31 [200/0] via 10.10.10.3, Ethernet4 18 | C 10.83.28.0/22 is directly connected, Management1 19 | C 172.16.0.1/32 is directly connected, Loopback0 20 | B E 172.16.0.2/32 [200/0] via 10.10.10.1, Ethernet3 21 | B E 172.16.0.3/32 [200/0] via 10.10.10.3, Ethernet4 -------------------------------------------------------------------------------- /outputs/cli/switch1/show lldp neighbors.txt: -------------------------------------------------------------------------------- 1 | Last table change time : 0:13:19 ago 2 | Number of table inserts : 6 3 | Number of table deletes : 2 4 | Number of table drops : 0 5 | Number of table age-outs : 0 6 | 7 | Port Neighbor Device ID Neighbor Port ID TTL 8 | Et3 switch2.lab.local Ethernet2 120 9 | Et4 switch3.lab.local Ethernet2 120 10 | Et8 s7289.lab.local Ethernet54/2 120 11 | Ma1 mgmt3.lab.local Ethernet2 120 -------------------------------------------------------------------------------- /outputs/cli/switch1/show running-config section bgp.txt: -------------------------------------------------------------------------------- 1 | router bgp 65001 2 | neighbor 10.10.10.1 remote-as 65002 3 | neighbor 10.10.10.1 maximum-routes 12000 4 | neighbor 10.10.10.3 remote-as 65003 5 | neighbor 10.10.10.3 maximum-routes 12000 6 | redistribute connected -------------------------------------------------------------------------------- /outputs/cli/switch1/show running-config.txt: -------------------------------------------------------------------------------- 1 | ! Command: show running-config 2 | ! device: switch1 (DCS-7150S-64-CL, EOS-4.22.4M-2GB) 3 | ! 4 | ! boot system flash:/EOS.swi 5 | ! 6 | daemon TerminAttr 7 | exec /usr/bin/TerminAttr -ingestgrpcurl=10.83.29.224:9910 -taillogs -ingestauth=key,IngestKey -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -ingestexclude=/Sysdb/cell/1/agent,/Sysdb/cell/2/agent 8 | no shutdown 9 | ! 10 | load-interval default 5 11 | ! 12 | transceiver qsfp default-mode 4x10G 13 | ! 14 | queue-monitor length 15 | ! 16 | logging host 10.83.28.52 17 | ! 18 | hostname switch1 19 | ip name-server vrf default 10.83.28.52 20 | ip name-server vrf default 10.83.29.222 21 | ip domain-name lab.local 22 | ! 23 | ntp server 10.83.28.52 24 | ! 25 | snmp-server community private rw 26 | snmp-server community public ro 27 | ! 28 | spanning-tree mode mstp 29 | ! 30 | aaa authorization exec default local 31 | ! 32 | no aaa root 33 | aaa authentication policy local allow-nopassword-remote-login 34 | ! 35 | username admin privilege 15 role network-admin nopassword 36 | username ansible privilege 15 secret sha512 $6$0DoDLGn9HJUMZ5o1$mbB2btAhRH084BiPEWMwdhOy3kBHKDNf9.yy9Cx3s/t8PNQrBhOqCiOTOwkdQhc/yuWIG0ROal30GWs7OgRDI. 37 | username cvp-infra privilege 15 secret sha512 $6$.I7/ZR/zlLIUv8fr$vR/JvLTbq5amMt6Y1SE4CKlPDv/AzJYlFYHkUZ17BDovm0Oi4aLdBULe1EmZ0Y9xKjVLMKpxCSKmlrAioDxbQ0 38 | username switch-infra privilege 15 nopassword 39 | username telemetry secret 5 $1$7ksxaeUt$.JJMVbNtjZVxakZqvo0dy1 40 | ! 41 | vlan 10 42 | name red 43 | ! 44 | vlan 20 45 | name blue 46 | ! 47 | vlan 30 48 | name yellow 49 | ! 50 | vlan 40 51 | ! 52 | interface Ethernet1 53 | shutdown 54 | ! 55 | interface Ethernet2 56 | shutdown 57 | ! 58 | interface Ethernet3 59 | description "switch2 **** Ethernet2" 60 | no switchport 61 | ip address 10.10.10.0/31 62 | ! 63 | interface Ethernet4 64 | description "switch3 **** Ethernet2" 65 | no switchport 66 | ip address 10.10.10.2/31 67 | ! 68 | interface Ethernet5 69 | shutdown 70 | switchport access vlan 30 71 | ! 72 | interface Ethernet6 73 | shutdown 74 | switchport access vlan 40 75 | ! 76 | interface Ethernet7 77 | shutdown 78 | switchport trunk native vlan 10 79 | switchport trunk allowed vlan 20,30,40 80 | ! 81 | interface Ethernet8 82 | description "testing ansible module eos_config" 83 | ! 84 | interface Ethernet9 85 | shutdown 86 | ! 87 | interface Ethernet10 88 | shutdown 89 | ! 90 | interface Ethernet11 91 | shutdown 92 | ! 93 | interface Ethernet12 94 | shutdown 95 | ! 96 | interface Ethernet13 97 | shutdown 98 | ! 99 | interface Ethernet14 100 | shutdown 101 | ! 102 | interface Ethernet15 103 | shutdown 104 | ! 105 | interface Ethernet16 106 | shutdown 107 | ! 108 | interface Ethernet17 109 | shutdown 110 | ! 111 | interface Ethernet18 112 | shutdown 113 | ! 114 | interface Ethernet19 115 | shutdown 116 | ! 117 | interface Ethernet20 118 | shutdown 119 | ! 120 | interface Ethernet21 121 | shutdown 122 | ! 123 | interface Ethernet22 124 | shutdown 125 | ! 126 | interface Ethernet23 127 | shutdown 128 | ! 129 | interface Ethernet24 130 | shutdown 131 | ! 132 | interface Ethernet25 133 | shutdown 134 | ! 135 | interface Ethernet26 136 | shutdown 137 | ! 138 | interface Ethernet27 139 | shutdown 140 | ! 141 | interface Ethernet28 142 | shutdown 143 | ! 144 | interface Ethernet29 145 | shutdown 146 | ! 147 | interface Ethernet30 148 | shutdown 149 | ! 150 | interface Ethernet31 151 | shutdown 152 | ! 153 | interface Ethernet32 154 | shutdown 155 | ! 156 | interface Ethernet33 157 | shutdown 158 | ! 159 | interface Ethernet34 160 | shutdown 161 | ! 162 | interface Ethernet35 163 | shutdown 164 | ! 165 | interface Ethernet36 166 | shutdown 167 | ! 168 | interface Ethernet37 169 | shutdown 170 | ! 171 | interface Ethernet38 172 | shutdown 173 | ! 174 | interface Ethernet39 175 | shutdown 176 | ! 177 | interface Ethernet40 178 | shutdown 179 | ! 180 | interface Ethernet41 181 | shutdown 182 | ! 183 | interface Ethernet42 184 | shutdown 185 | ! 186 | interface Ethernet43 187 | shutdown 188 | ! 189 | interface Ethernet44 190 | shutdown 191 | ! 192 | interface Ethernet45 193 | shutdown 194 | ! 195 | interface Ethernet46 196 | shutdown 197 | ! 198 | interface Ethernet47 199 | shutdown 200 | ! 201 | interface Ethernet48 202 | shutdown 203 | ! 204 | interface Ethernet49/1 205 | shutdown 206 | ! 207 | interface Ethernet49/2 208 | shutdown 209 | ! 210 | interface Ethernet49/3 211 | shutdown 212 | ! 213 | interface Ethernet49/4 214 | shutdown 215 | ! 216 | interface Ethernet50/1 217 | shutdown 218 | ! 219 | interface Ethernet50/2 220 | shutdown 221 | ! 222 | interface Ethernet50/3 223 | shutdown 224 | ! 225 | interface Ethernet50/4 226 | shutdown 227 | ! 228 | interface Ethernet51/1 229 | shutdown 230 | ! 231 | interface Ethernet51/2 232 | shutdown 233 | ! 234 | interface Ethernet51/3 235 | shutdown 236 | ! 237 | interface Ethernet51/4 238 | shutdown 239 | ! 240 | interface Ethernet52/1 241 | shutdown 242 | ! 243 | interface Ethernet52/2 244 | shutdown 245 | ! 246 | interface Ethernet52/3 247 | shutdown 248 | ! 249 | interface Ethernet52/4 250 | shutdown 251 | ! 252 | interface Loopback0 253 | ip address 172.16.0.1/32 254 | ! 255 | interface Management1 256 | ip address 10.83.28.123/22 257 | ! 258 | ip route 0.0.0.0/0 10.83.28.1 259 | ! 260 | ip routing 261 | ! 262 | router bgp 65001 263 | neighbor 10.10.10.1 remote-as 65002 264 | neighbor 10.10.10.1 maximum-routes 12000 265 | neighbor 10.10.10.3 remote-as 65003 266 | neighbor 10.10.10.3 maximum-routes 12000 267 | redistribute connected 268 | ! 269 | management api http-commands 270 | protocol http 271 | no shutdown 272 | ! 273 | end -------------------------------------------------------------------------------- /outputs/cli/switch1/show version | json.txt: -------------------------------------------------------------------------------- 1 | {"memTotal": 4009188, "uptime": 400196.37, "modelName": "DCS-7150S-64-CL-F", "internalVersion": "4.22.4M-2GB-15583082.4224M", "mfgName": "Arista", "serialNumber": "JPE14210750", "systemMacAddress": "00:1c:73:86:12:f9", "bootupTimestamp": 1587714035.0, "memFree": 2810136, "version": "4.22.4M-2GB", "architecture": "i686", "isIntlVersion": false, "internalBuildId": "523a3357-484c-4110-9019-39750ffa8af5", "hardwareRevision": "01.03"} -------------------------------------------------------------------------------- /outputs/cli/switch2/show interfaces description.txt: -------------------------------------------------------------------------------- 1 | Interface Status Protocol Description 2 | Et1 admin down down 3 | Et2 up up "switch1 **** Ethernet3" 4 | Et3 admin down down 5 | Et4 admin down down 6 | Et5 admin down notpresent 7 | Et6 admin down notpresent 8 | Et7 admin down notpresent 9 | Et8 admin down notpresent 10 | Et9 admin down notpresent 11 | Et10 admin down notpresent 12 | Et11 admin down notpresent 13 | Et12 admin down notpresent 14 | Et13 admin down notpresent 15 | Et14 admin down notpresent 16 | Et15 admin down notpresent 17 | Et16 admin down notpresent 18 | Et17 admin down notpresent 19 | Et18 admin down notpresent 20 | Et19 admin down notpresent 21 | Et20 admin down notpresent 22 | Et21 admin down notpresent 23 | Et22 admin down notpresent 24 | Et23 admin down notpresent 25 | Et24 up up "switch3 **** Ethernet24" 26 | Et25 admin down notpresent 27 | Et26 admin down notpresent 28 | Et27 admin down notpresent 29 | Et28 admin down notpresent 30 | Et29 admin down notpresent 31 | Et30 admin down notpresent 32 | Et31 admin down notpresent 33 | Et32 admin down notpresent 34 | Et33 admin down notpresent 35 | Et34 admin down notpresent 36 | Et35 admin down notpresent 37 | Et36 admin down notpresent 38 | Et37 admin down notpresent 39 | Et38 admin down notpresent 40 | Et39 admin down notpresent 41 | Et40 admin down notpresent 42 | Et41 admin down notpresent 43 | Et42 admin down notpresent 44 | Et43 admin down notpresent 45 | Et44 admin down notpresent 46 | Et45 admin down down 47 | Et46 admin down down 48 | Et47 admin down down 49 | Et48 admin down down 50 | Et49/1 admin down notpresent 51 | Et49/2 admin down notpresent 52 | Et49/3 admin down notpresent 53 | Et49/4 admin down notpresent 54 | Et50/1 admin down down 55 | Et50/2 admin down down 56 | Et50/3 admin down down 57 | Et50/4 admin down down 58 | Et51/1 admin down notpresent 59 | Et51/2 admin down notpresent 60 | Et51/3 admin down notpresent 61 | Et51/4 admin down notpresent 62 | Et52/1 admin down notpresent 63 | Et52/2 admin down notpresent 64 | Et52/3 admin down notpresent 65 | Et52/4 admin down notpresent 66 | Lo0 up up 67 | Ma1 up up -------------------------------------------------------------------------------- /outputs/cli/switch2/show ip bgp summary.txt: -------------------------------------------------------------------------------- 1 | BGP summary information for VRF default 2 | Router identifier 172.16.10.2, local AS number 65002 3 | Neighbor Status Codes: m - Under maintenance 4 | Neighbor V AS MsgRcvd MsgSent InQ OutQ Up/Down State PfxRcd PfxAcc 5 | 10.10.10.0 4 65001 2870 2877 0 0 1d05h Estab 6 6 6 | 10.10.10.5 4 65003 2862 2863 0 0 1d23h Estab 6 6 -------------------------------------------------------------------------------- /outputs/cli/switch2/show ip interface brief.txt: -------------------------------------------------------------------------------- 1 | Address 2 | Interface IP Address Status Protocol MTU Owner 3 | --------------- ------------------- ---------- ------------- ---------- ------- 4 | Ethernet2 10.10.10.1/31 up up 1500 5 | Ethernet24 10.10.10.4/31 up up 1500 6 | Loopback0 172.16.0.2/32 up up 65535 7 | Management1 10.83.28.124/22 up up 1500 -------------------------------------------------------------------------------- /outputs/cli/switch2/show ip route.txt: -------------------------------------------------------------------------------- 1 | VRF: default 2 | Codes: C - connected, S - static, K - kernel, 3 | O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1, 4 | E2 - OSPF external type 2, N1 - OSPF NSSA external type 1, 5 | N2 - OSPF NSSA external type2, B - BGP, B I - iBGP, B E - eBGP, 6 | R - RIP, I L1 - IS-IS level 1, I L2 - IS-IS level 2, 7 | O3 - OSPFv3, A B - BGP Aggregate, A O - OSPF Summary, 8 | NG - Nexthop Group Static Route, V - VXLAN Control Service, 9 | DH - DHCP client installed default route, M - Martian, 10 | DP - Dynamic Policy Route, L - VRF Leaked 11 | 12 | Gateway of last resort: 13 | S 0.0.0.0/0 [1/0] via 10.83.28.1, Management1 14 | 15 | C 10.10.10.0/31 is directly connected, Ethernet2 16 | B E 10.10.10.2/31 [200/0] via 10.10.10.0, Ethernet2 17 | C 10.10.10.4/31 is directly connected, Ethernet24 18 | C 10.83.28.0/22 is directly connected, Management1 19 | B E 172.16.0.1/32 [200/0] via 10.10.10.0, Ethernet2 20 | C 172.16.0.2/32 is directly connected, Loopback0 21 | B E 172.16.0.3/32 [200/0] via 10.10.10.5, Ethernet24 -------------------------------------------------------------------------------- /outputs/cli/switch2/show lldp neighbors.txt: -------------------------------------------------------------------------------- 1 | Last table change time : 0:13:18 ago 2 | Number of table inserts : 5 3 | Number of table deletes : 2 4 | Number of table drops : 0 5 | Number of table age-outs : 0 6 | 7 | Port Neighbor Device ID Neighbor Port ID TTL 8 | Et2 switch1.lab.local Ethernet3 120 9 | Et24 switch3.lab.local Ethernet24 120 10 | Ma1 mgmt3.lab.local Ethernet14 120 -------------------------------------------------------------------------------- /outputs/cli/switch2/show running-config section bgp.txt: -------------------------------------------------------------------------------- 1 | router bgp 65002 2 | router-id 172.16.10.2 3 | neighbor 10.10.10.0 remote-as 65001 4 | neighbor 10.10.10.0 maximum-routes 12000 5 | neighbor 10.10.10.5 remote-as 65003 6 | neighbor 10.10.10.5 maximum-routes 12000 7 | redistribute connected -------------------------------------------------------------------------------- /outputs/cli/switch2/show running-config.txt: -------------------------------------------------------------------------------- 1 | ! Command: show running-config 2 | ! device: switch2 (DCS-7150S-64-CL, EOS-4.22.4M-2GB) 3 | ! 4 | ! boot system flash:/EOS.swi 5 | ! 6 | daemon TerminAttr 7 | exec /usr/bin/TerminAttr -ingestgrpcurl=10.83.29.224:9910 -taillogs -ingestauth=key,IngestKey -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -ingestexclude=/Sysdb/cell/1/agent,/Sysdb/cell/2/agent 8 | no shutdown 9 | ! 10 | load-interval default 5 11 | ! 12 | transceiver qsfp default-mode 4x10G 13 | ! 14 | queue-monitor length 15 | ! 16 | logging host 10.83.28.52 17 | ! 18 | hostname switch2 19 | ip name-server vrf default 10.83.28.52 20 | ip name-server vrf default 10.83.29.222 21 | ip domain-name lab.local 22 | ! 23 | ntp server 10.83.28.52 24 | ! 25 | snmp-server community public ro 26 | ! 27 | spanning-tree mode mstp 28 | ! 29 | aaa authorization exec default local 30 | ! 31 | no aaa root 32 | aaa authentication policy local allow-nopassword-remote-login 33 | ! 34 | username admin privilege 15 role network-admin nopassword 35 | username ansible privilege 15 secret sha512 $6$kF4LcqnNXScyWdD.$d4/BTBXRDDYvvGXzgtHWXD41yP25Q/KhVeCueMkOVCv/bEv8rL74BRIvGpo0EHZBoWamWXeR.n3Mq2k2vorOw1 36 | username telemetry secret 5 $1$aVYVFaqH$W8oKA8utuEKVf8wcB1SLz. 37 | ! 38 | vlan 10 39 | name red 40 | ! 41 | vlan 20 42 | name blue 43 | ! 44 | vlan 30 45 | name yellow 46 | ! 47 | interface Ethernet1 48 | shutdown 49 | ! 50 | interface Ethernet2 51 | description "switch1 **** Ethernet3" 52 | no switchport 53 | ip address 10.10.10.1/31 54 | ! 55 | interface Ethernet3 56 | shutdown 57 | ! 58 | interface Ethernet4 59 | shutdown 60 | ! 61 | interface Ethernet5 62 | shutdown 63 | ! 64 | interface Ethernet6 65 | shutdown 66 | ! 67 | interface Ethernet7 68 | shutdown 69 | ! 70 | interface Ethernet8 71 | shutdown 72 | switchport access vlan 20 73 | ! 74 | interface Ethernet9 75 | shutdown 76 | switchport access vlan 20 77 | ! 78 | interface Ethernet10 79 | shutdown 80 | switchport trunk native vlan 10 81 | switchport trunk allowed vlan 20,30,40 82 | ! 83 | interface Ethernet11 84 | shutdown 85 | ! 86 | interface Ethernet12 87 | shutdown 88 | ! 89 | interface Ethernet13 90 | shutdown 91 | ! 92 | interface Ethernet14 93 | shutdown 94 | ! 95 | interface Ethernet15 96 | shutdown 97 | ! 98 | interface Ethernet16 99 | shutdown 100 | ! 101 | interface Ethernet17 102 | shutdown 103 | ! 104 | interface Ethernet18 105 | shutdown 106 | ! 107 | interface Ethernet19 108 | shutdown 109 | ! 110 | interface Ethernet20 111 | shutdown 112 | ! 113 | interface Ethernet21 114 | shutdown 115 | ! 116 | interface Ethernet22 117 | shutdown 118 | ! 119 | interface Ethernet23 120 | shutdown 121 | ! 122 | interface Ethernet24 123 | description "switch3 **** Ethernet24" 124 | no switchport 125 | ip address 10.10.10.4/31 126 | ! 127 | interface Ethernet25 128 | shutdown 129 | ! 130 | interface Ethernet26 131 | shutdown 132 | ! 133 | interface Ethernet27 134 | shutdown 135 | ! 136 | interface Ethernet28 137 | shutdown 138 | ! 139 | interface Ethernet29 140 | shutdown 141 | ! 142 | interface Ethernet30 143 | shutdown 144 | ! 145 | interface Ethernet31 146 | shutdown 147 | ! 148 | interface Ethernet32 149 | shutdown 150 | ! 151 | interface Ethernet33 152 | shutdown 153 | ! 154 | interface Ethernet34 155 | shutdown 156 | ! 157 | interface Ethernet35 158 | shutdown 159 | ! 160 | interface Ethernet36 161 | shutdown 162 | ! 163 | interface Ethernet37 164 | shutdown 165 | ! 166 | interface Ethernet38 167 | shutdown 168 | ! 169 | interface Ethernet39 170 | shutdown 171 | ! 172 | interface Ethernet40 173 | shutdown 174 | ! 175 | interface Ethernet41 176 | shutdown 177 | ! 178 | interface Ethernet42 179 | shutdown 180 | ! 181 | interface Ethernet43 182 | shutdown 183 | ! 184 | interface Ethernet44 185 | shutdown 186 | ! 187 | interface Ethernet45 188 | shutdown 189 | ! 190 | interface Ethernet46 191 | shutdown 192 | ! 193 | interface Ethernet47 194 | shutdown 195 | ! 196 | interface Ethernet48 197 | shutdown 198 | ! 199 | interface Ethernet49/1 200 | shutdown 201 | ! 202 | interface Ethernet49/2 203 | shutdown 204 | ! 205 | interface Ethernet49/3 206 | shutdown 207 | ! 208 | interface Ethernet49/4 209 | shutdown 210 | ! 211 | interface Ethernet50/1 212 | shutdown 213 | ! 214 | interface Ethernet50/2 215 | shutdown 216 | ! 217 | interface Ethernet50/3 218 | shutdown 219 | ! 220 | interface Ethernet50/4 221 | shutdown 222 | ! 223 | interface Ethernet51/1 224 | shutdown 225 | ! 226 | interface Ethernet51/2 227 | shutdown 228 | ! 229 | interface Ethernet51/3 230 | shutdown 231 | ! 232 | interface Ethernet51/4 233 | shutdown 234 | ! 235 | interface Ethernet52/1 236 | shutdown 237 | ! 238 | interface Ethernet52/2 239 | shutdown 240 | ! 241 | interface Ethernet52/3 242 | shutdown 243 | ! 244 | interface Ethernet52/4 245 | shutdown 246 | ! 247 | interface Loopback0 248 | ip address 172.16.0.2/32 249 | ! 250 | interface Management1 251 | ip address 10.83.28.124/22 252 | ! 253 | ip route 0.0.0.0/0 10.83.28.1 254 | ! 255 | ip routing 256 | ! 257 | router bgp 65002 258 | router-id 172.16.10.2 259 | neighbor 10.10.10.0 remote-as 65001 260 | neighbor 10.10.10.0 maximum-routes 12000 261 | neighbor 10.10.10.5 remote-as 65003 262 | neighbor 10.10.10.5 maximum-routes 12000 263 | redistribute connected 264 | ! 265 | management api http-commands 266 | protocol http 267 | no shutdown 268 | ! 269 | end -------------------------------------------------------------------------------- /outputs/cli/switch2/show version | json.txt: -------------------------------------------------------------------------------- 1 | {"memTotal": 4009188, "uptime": 400185.7, "modelName": "DCS-7150S-64-CL-F", "internalVersion": "4.22.4M-2GB-15583082.4224M", "mfgName": "Arista", "serialNumber": "JPE14210734", "systemMacAddress": "00:1c:73:85:ea:3d", "bootupTimestamp": 1587714045.0, "memFree": 2819680, "version": "4.22.4M-2GB", "architecture": "i686", "isIntlVersion": false, "internalBuildId": "523a3357-484c-4110-9019-39750ffa8af5", "hardwareRevision": "01.03"} -------------------------------------------------------------------------------- /outputs/cli/switch3/show interfaces description.txt: -------------------------------------------------------------------------------- 1 | Interface Status Protocol Description 2 | Et1 admin down down 3 | Et2 up up "switch1 **** Ethernet4" 4 | Et3 admin down down 5 | Et4 admin down down 6 | Et5 admin down notpresent 7 | Et6 admin down notpresent 8 | Et7 admin down notpresent 9 | Et8 admin down notpresent 10 | Et9 admin down notpresent 11 | Et10 admin down notpresent 12 | Et11 admin down notpresent 13 | Et12 admin down notpresent 14 | Et13 admin down notpresent 15 | Et14 admin down notpresent 16 | Et15 admin down notpresent 17 | Et16 admin down notpresent 18 | Et17 admin down notpresent 19 | Et18 admin down notpresent 20 | Et19 admin down notpresent 21 | Et20 admin down notpresent 22 | Et21 admin down notpresent 23 | Et22 admin down notpresent 24 | Et23 admin down notpresent 25 | Et24 up up "switch2 **** Ethernet24" 26 | Et25 admin down notpresent 27 | Et26 admin down notpresent 28 | Et27 admin down notpresent 29 | Et28 admin down notpresent 30 | Et29 admin down notpresent 31 | Et30 admin down notpresent 32 | Et31 admin down notpresent 33 | Et32 admin down notpresent 34 | Et33 admin down notpresent 35 | Et34 admin down notpresent 36 | Et35 admin down notpresent 37 | Et36 admin down notpresent 38 | Et37 admin down notpresent 39 | Et38 admin down notpresent 40 | Et39 admin down notpresent 41 | Et40 admin down notpresent 42 | Et41 admin down notpresent 43 | Et42 admin down notpresent 44 | Et43 admin down notpresent 45 | Et44 admin down notpresent 46 | Et45 admin down notpresent 47 | Et46 admin down notpresent 48 | Et47 admin down down 49 | Et48 admin down down 50 | Et49/1 admin down notpresent 51 | Et49/2 admin down notpresent 52 | Et49/3 admin down notpresent 53 | Et49/4 admin down notpresent 54 | Et50/1 admin down notpresent 55 | Et50/2 admin down notpresent 56 | Et50/3 admin down notpresent 57 | Et50/4 admin down notpresent 58 | Et51/1 admin down notpresent 59 | Et51/2 admin down notpresent 60 | Et51/3 admin down notpresent 61 | Et51/4 admin down notpresent 62 | Et52/1 admin down notpresent 63 | Et52/2 admin down notpresent 64 | Et52/3 admin down notpresent 65 | Et52/4 admin down notpresent 66 | Lo0 up up 67 | Ma1 up up -------------------------------------------------------------------------------- /outputs/cli/switch3/show ip bgp summary.txt: -------------------------------------------------------------------------------- 1 | BGP summary information for VRF default 2 | Router identifier 172.16.0.3, local AS number 65003 3 | Neighbor Status Codes: m - Under maintenance 4 | Neighbor V AS MsgRcvd MsgSent InQ OutQ Up/Down State PfxRcd PfxAcc 5 | 10.10.10.2 4 65001 2888 2878 0 0 1d23h Estab 5 5 6 | 10.10.10.4 4 65002 2863 2862 0 0 1d23h Estab 6 6 -------------------------------------------------------------------------------- /outputs/cli/switch3/show ip interface brief.txt: -------------------------------------------------------------------------------- 1 | Interface IP Address Status Protocol MTU 2 | Ethernet2 10.10.10.3/31 up up 1500 3 | Ethernet24 10.10.10.5/31 up up 1500 4 | Loopback0 172.16.0.3/32 up up 65535 5 | Management1 10.83.28.125/22 up up 1500 -------------------------------------------------------------------------------- /outputs/cli/switch3/show ip route.txt: -------------------------------------------------------------------------------- 1 | VRF name: default 2 | Codes: C - connected, S - static, K - kernel, 3 | O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1, 4 | E2 - OSPF external type 2, N1 - OSPF NSSA external type 1, 5 | N2 - OSPF NSSA external type2, B I - iBGP, B E - eBGP, 6 | R - RIP, I L1 - ISIS level 1, I L2 - ISIS level 2, 7 | O3 - OSPFv3, A B - BGP Aggregate, A O - OSPF Summary, 8 | NG - Nexthop Group Static Route, V - VXLAN Control Service 9 | 10 | Gateway of last resort: 11 | S 0.0.0.0/0 [1/0] via 10.83.28.1, Management1 12 | 13 | B E 10.10.10.0/31 [200/0] via 10.10.10.2, Ethernet2 14 | via 10.10.10.4, Ethernet24 15 | C 10.10.10.2/31 is directly connected, Ethernet2 16 | C 10.10.10.4/31 is directly connected, Ethernet24 17 | C 10.83.28.0/22 is directly connected, Management1 18 | B E 172.16.0.1/32 [200/0] via 10.10.10.2, Ethernet2 19 | B E 172.16.0.2/32 [200/0] via 10.10.10.4, Ethernet24 20 | C 172.16.0.3/32 is directly connected, Loopback0 -------------------------------------------------------------------------------- /outputs/cli/switch3/show lldp neighbors.txt: -------------------------------------------------------------------------------- 1 | Last table change time : 0:13:19 ago 2 | Number of table inserts : 3 3 | Number of table deletes : 0 4 | Number of table drops : 0 5 | Number of table age-outs : 0 6 | 7 | Port Neighbor Device ID Neighbor Port ID TTL 8 | Et2 switch1.lab.local Ethernet4 120 9 | Et24 switch2.lab.local Ethernet24 120 10 | Ma1 mgmt3.lab.local Ethernet15 120 -------------------------------------------------------------------------------- /outputs/cli/switch3/show running-config section bgp.txt: -------------------------------------------------------------------------------- 1 | router bgp 65003 2 | maximum-paths 2 ecmp 2 3 | neighbor 10.10.10.2 remote-as 65001 4 | neighbor 10.10.10.2 maximum-routes 12000 5 | neighbor 10.10.10.4 remote-as 65002 6 | neighbor 10.10.10.4 maximum-routes 12000 7 | redistribute connected -------------------------------------------------------------------------------- /outputs/cli/switch3/show running-config.txt: -------------------------------------------------------------------------------- 1 | ! Command: show running-config 2 | ! device: switch3 (DCS-7150S-64-CL, EOS-4.18.11M-2GB) 3 | ! 4 | ! boot system flash:/EOS.swi 5 | ! 6 | daemon TerminAttr 7 | exec /usr/bin/TerminAttr -ingestgrpcurl=10.83.29.224:9910 -taillogs -ingestauth=key,IngestKey -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -ingestexclude=/Sysdb/cell/1/agent,/Sysdb/cell/2/agent 8 | no shutdown 9 | ! 10 | load-interval default 5 11 | ! 12 | transceiver qsfp default-mode 4x10G 13 | ! 14 | queue-monitor length 15 | ! 16 | logging host 10.83.28.52 17 | ! 18 | hostname switch3 19 | ip name-server vrf default 10.83.28.52 20 | ip name-server vrf default 10.83.29.222 21 | ip domain-name lab.local 22 | ! 23 | ntp server 10.83.28.52 24 | ! 25 | snmp-server community private rw 26 | snmp-server community public ro 27 | ! 28 | spanning-tree mode mstp 29 | ! 30 | aaa authorization exec default local 31 | ! 32 | no aaa root 33 | aaa authentication policy local allow-nopassword-remote-login 34 | ! 35 | username admin privilege 15 role network-admin nopassword 36 | username ansible privilege 15 secret sha512 $6$iqjO8r.SFB1kV1fW$hfZ6x8KuSBPP6VfAS.2ZcCQhyqY3E8rrH3j.4ITw9vltYModDM7fsAmZ5k7Hke/yu/kVS7mk8qhaHnRPH7EAW/ 37 | username cvp-infra privilege 15 secret sha512 $6$.I7/ZR/zlLIUv8fr$vR/JvLTbq5amMt6Y1SE4CKlPDv/AzJYlFYHkUZ17BDovm0Oi4aLdBULe1EmZ0Y9xKjVLMKpxCSKmlrAioDxbQ0 38 | username switch-infra privilege 15 nopassword 39 | username telemetry secret 5 $1$7ksxaeUt$.JJMVbNtjZVxakZqvo0dy1 40 | ! 41 | vlan 10 42 | name red 43 | ! 44 | vlan 20 45 | name blue 46 | ! 47 | vlan 30 48 | name yellow 49 | ! 50 | interface Ethernet1 51 | shutdown 52 | ! 53 | interface Ethernet2 54 | description "switch1 **** Ethernet4" 55 | no switchport 56 | ip address 10.10.10.3/31 57 | ! 58 | interface Ethernet3 59 | shutdown 60 | ! 61 | interface Ethernet4 62 | shutdown 63 | ! 64 | interface Ethernet5 65 | shutdown 66 | ! 67 | interface Ethernet6 68 | shutdown 69 | ! 70 | interface Ethernet7 71 | shutdown 72 | ! 73 | interface Ethernet8 74 | shutdown 75 | ! 76 | interface Ethernet9 77 | shutdown 78 | ! 79 | interface Ethernet10 80 | shutdown 81 | ! 82 | interface Ethernet11 83 | shutdown 84 | ! 85 | interface Ethernet12 86 | shutdown 87 | ! 88 | interface Ethernet13 89 | shutdown 90 | ! 91 | interface Ethernet14 92 | shutdown 93 | ! 94 | interface Ethernet15 95 | shutdown 96 | ! 97 | interface Ethernet16 98 | shutdown 99 | ! 100 | interface Ethernet17 101 | shutdown 102 | ! 103 | interface Ethernet18 104 | shutdown 105 | ! 106 | interface Ethernet19 107 | shutdown 108 | ! 109 | interface Ethernet20 110 | shutdown 111 | ! 112 | interface Ethernet21 113 | shutdown 114 | ! 115 | interface Ethernet22 116 | shutdown 117 | ! 118 | interface Ethernet23 119 | shutdown 120 | ! 121 | interface Ethernet24 122 | description "switch2 **** Ethernet24" 123 | no switchport 124 | ip address 10.10.10.5/31 125 | ! 126 | interface Ethernet25 127 | shutdown 128 | ! 129 | interface Ethernet26 130 | shutdown 131 | ! 132 | interface Ethernet27 133 | shutdown 134 | ! 135 | interface Ethernet28 136 | shutdown 137 | ! 138 | interface Ethernet29 139 | shutdown 140 | ! 141 | interface Ethernet30 142 | shutdown 143 | ! 144 | interface Ethernet31 145 | shutdown 146 | ! 147 | interface Ethernet32 148 | shutdown 149 | ! 150 | interface Ethernet33 151 | shutdown 152 | ! 153 | interface Ethernet34 154 | shutdown 155 | ! 156 | interface Ethernet35 157 | shutdown 158 | ! 159 | interface Ethernet36 160 | shutdown 161 | ! 162 | interface Ethernet37 163 | shutdown 164 | ! 165 | interface Ethernet38 166 | shutdown 167 | ! 168 | interface Ethernet39 169 | shutdown 170 | ! 171 | interface Ethernet40 172 | shutdown 173 | ! 174 | interface Ethernet41 175 | shutdown 176 | ! 177 | interface Ethernet42 178 | shutdown 179 | ! 180 | interface Ethernet43 181 | shutdown 182 | ! 183 | interface Ethernet44 184 | shutdown 185 | ! 186 | interface Ethernet45 187 | shutdown 188 | ! 189 | interface Ethernet46 190 | shutdown 191 | ! 192 | interface Ethernet47 193 | shutdown 194 | ! 195 | interface Ethernet48 196 | shutdown 197 | ! 198 | interface Ethernet49/1 199 | shutdown 200 | ! 201 | interface Ethernet49/2 202 | shutdown 203 | ! 204 | interface Ethernet49/3 205 | shutdown 206 | ! 207 | interface Ethernet49/4 208 | shutdown 209 | ! 210 | interface Ethernet50/1 211 | shutdown 212 | ! 213 | interface Ethernet50/2 214 | shutdown 215 | ! 216 | interface Ethernet50/3 217 | shutdown 218 | ! 219 | interface Ethernet50/4 220 | shutdown 221 | ! 222 | interface Ethernet51/1 223 | shutdown 224 | ! 225 | interface Ethernet51/2 226 | shutdown 227 | ! 228 | interface Ethernet51/3 229 | shutdown 230 | ! 231 | interface Ethernet51/4 232 | shutdown 233 | ! 234 | interface Ethernet52/1 235 | shutdown 236 | ! 237 | interface Ethernet52/2 238 | shutdown 239 | ! 240 | interface Ethernet52/3 241 | shutdown 242 | ! 243 | interface Ethernet52/4 244 | shutdown 245 | ! 246 | interface Loopback0 247 | ip address 172.16.0.3/32 248 | ! 249 | interface Management1 250 | ip address 10.83.28.125/22 251 | ! 252 | ip route 0.0.0.0/0 10.83.28.1 253 | ! 254 | ip routing 255 | ! 256 | router bgp 65003 257 | maximum-paths 2 ecmp 2 258 | neighbor 10.10.10.2 remote-as 65001 259 | neighbor 10.10.10.2 maximum-routes 12000 260 | neighbor 10.10.10.4 remote-as 65002 261 | neighbor 10.10.10.4 maximum-routes 12000 262 | redistribute connected 263 | ! 264 | management api http-commands 265 | protocol http 266 | no shutdown 267 | ! 268 | end -------------------------------------------------------------------------------- /outputs/cli/switch3/show version | json.txt: -------------------------------------------------------------------------------- 1 | {"modelName": "DCS-7150S-64-CL-F", "internalVersion": "4.18.11M-2GB-11741054.41811M", "systemMacAddress": "00:1c:73:86:56:85", "serialNumber": "JPE14210772", "memTotal": 3963672, "bootupTimestamp": 1587740732.08, "memFree": 2404780, "version": "4.18.11M-2GB", "architecture": "i386", "isIntlVersion": false, "internalBuildId": "d6e34aa7-d426-4121-8b4f-0e6252419a5f", "hardwareRevision": "01.03"} -------------------------------------------------------------------------------- /outputs/conf_generated/switch1.cfg: -------------------------------------------------------------------------------- 1 | hostname switch1 2 | ip domain-name lab.local 3 | 4 | interface Ethernet3 5 | no shutdown 6 | description "switch2 **** Ethernet2" 7 | no switchport 8 | ip address 10.10.10.0/31 9 | 10 | interface Ethernet4 11 | no shutdown 12 | description "switch3 **** Ethernet2" 13 | no switchport 14 | ip address 10.10.10.2/31 15 | interface Loopback0 16 | ip address 172.16.0.1/32 17 | router bgp 65001 18 | redistribute connected 19 | 20 | neighbor 10.10.10.1 remote-as 65002 21 | 22 | neighbor 10.10.10.3 remote-as 65003 23 | -------------------------------------------------------------------------------- /outputs/conf_generated/switch2.cfg: -------------------------------------------------------------------------------- 1 | hostname switch2 2 | ip domain-name lab.local 3 | 4 | interface Ethernet2 5 | no shutdown 6 | description "switch1 **** Ethernet3" 7 | no switchport 8 | ip address 10.10.10.1/31 9 | 10 | interface Ethernet24 11 | no shutdown 12 | description "switch3 **** Ethernet24" 13 | no switchport 14 | ip address 10.10.10.4/31 15 | interface Loopback0 16 | ip address 172.16.0.2/32 17 | router bgp 65002 18 | redistribute connected 19 | 20 | neighbor 10.10.10.0 remote-as 65001 21 | 22 | neighbor 10.10.10.5 remote-as 65003 23 | -------------------------------------------------------------------------------- /outputs/conf_generated/switch3.cfg: -------------------------------------------------------------------------------- 1 | hostname switch3 2 | ip domain-name lab.local 3 | 4 | interface Ethernet2 5 | no shutdown 6 | description "switch1 **** Ethernet4" 7 | no switchport 8 | ip address 10.10.10.3/31 9 | 10 | interface Ethernet24 11 | no shutdown 12 | description "switch2 **** Ethernet24" 13 | no switchport 14 | ip address 10.10.10.5/31 15 | interface Loopback0 16 | ip address 172.16.0.3/32 17 | router bgp 65003 18 | redistribute connected 19 | 20 | neighbor 10.10.10.2 remote-as 65001 21 | 22 | neighbor 10.10.10.4 remote-as 65002 23 | -------------------------------------------------------------------------------- /outputs/facts/hardware/switch1.json: -------------------------------------------------------------------------------- 1 | {"ansible_network_resources": {}, "ansible_net_gather_network_resources": [], "ansible_net_gather_subset": ["hardware", "default"], "ansible_net_filesystems": ["file:", "flash:", "system:"], "ansible_net_memfree_mb": 2765.43359375, "ansible_net_memtotal_mb": 3915.22265625, "ansible_net_serialnum": "JPE14210750", "ansible_net_fqdn": "switch1.lab.local", "ansible_net_hostname": "switch1", "ansible_net_system": "eos", "ansible_net_model": "DCS-7150S-64-CL-F", "ansible_net_image": "flash:/EOS.swi", "ansible_net_version": "4.22.4M-2GB", "ansible_net_api": "cliconf", "ansible_net_python_version": "3.7.7"} -------------------------------------------------------------------------------- /outputs/facts/hardware/switch2.json: -------------------------------------------------------------------------------- 1 | {"ansible_network_resources": {}, "ansible_net_gather_network_resources": [], "ansible_net_gather_subset": ["hardware", "default"], "ansible_net_filesystems": ["file:", "flash:", "system:"], "ansible_net_memfree_mb": 2763.2421875, "ansible_net_memtotal_mb": 3915.22265625, "ansible_net_serialnum": "JPE14210734", "ansible_net_fqdn": "switch2.lab.local", "ansible_net_hostname": "switch2", "ansible_net_system": "eos", "ansible_net_model": "DCS-7150S-64-CL-F", "ansible_net_image": "flash:/EOS.swi", "ansible_net_version": "4.22.4M-2GB", "ansible_net_api": "cliconf", "ansible_net_python_version": "3.7.7"} -------------------------------------------------------------------------------- /outputs/facts/hardware/switch3.json: -------------------------------------------------------------------------------- 1 | {"ansible_network_resources": {}, "ansible_net_gather_network_resources": [], "ansible_net_gather_subset": ["hardware", "default"], "ansible_net_filesystems": ["file:", "flash:", "system:"], "ansible_net_memfree_mb": 2400.4921875, "ansible_net_memtotal_mb": 3870.7734375, "ansible_net_serialnum": "JPE14210772", "ansible_net_fqdn": "switch3.lab.local", "ansible_net_hostname": "switch3", "ansible_net_system": "eos", "ansible_net_model": "DCS-7150S-64-CL-F", "ansible_net_image": "flash:/EOS.swi", "ansible_net_version": "4.18.11M-2GB", "ansible_net_api": "cliconf", "ansible_net_python_version": "3.7.7"} -------------------------------------------------------------------------------- /outputs/facts/resources/switch1/L2_interfaces.json: -------------------------------------------------------------------------------- 1 | [{"name": "Ethernet1"}, {"name": "Ethernet2"}, {"name": "Ethernet3"}, {"name": "Ethernet4"}, {"access": {"vlan": 30}, "name": "Ethernet5"}, {"access": {"vlan": 40}, "name": "Ethernet6"}, {"name": "Ethernet7", "trunk": {"native_vlan": 10, "trunk_allowed_vlans": ["20", "30", "40"]}}, {"name": "Ethernet8"}, {"name": "Ethernet9"}, {"name": "Ethernet10"}, {"name": "Ethernet11"}, {"name": "Ethernet12"}, {"name": "Ethernet13"}, {"name": "Ethernet14"}, {"name": "Ethernet15"}, {"name": "Ethernet16"}, {"name": "Ethernet17"}, {"name": "Ethernet18"}, {"name": "Ethernet19"}, {"name": "Ethernet20"}, {"name": "Ethernet21"}, {"name": "Ethernet22"}, {"name": "Ethernet23"}, {"name": "Ethernet24"}, {"name": "Ethernet25"}, {"name": "Ethernet26"}, {"name": "Ethernet27"}, {"name": "Ethernet28"}, {"name": "Ethernet29"}, {"name": "Ethernet30"}, {"name": "Ethernet31"}, {"name": "Ethernet32"}, {"name": "Ethernet33"}, {"name": "Ethernet34"}, {"name": "Ethernet35"}, {"name": "Ethernet36"}, {"name": "Ethernet37"}, {"name": "Ethernet38"}, {"name": "Ethernet39"}, {"name": "Ethernet40"}, {"name": "Ethernet41"}, {"name": "Ethernet42"}, {"name": "Ethernet43"}, {"name": "Ethernet44"}, {"name": "Ethernet45"}, {"name": "Ethernet46"}, {"name": "Ethernet47"}, {"name": "Ethernet48"}, {"name": "Ethernet49/1"}, {"name": "Ethernet49/2"}, {"name": "Ethernet49/3"}, {"name": "Ethernet49/4"}, {"name": "Ethernet50/1"}, {"name": "Ethernet50/2"}, {"name": "Ethernet50/3"}, {"name": "Ethernet50/4"}, {"name": "Ethernet51/1"}, {"name": "Ethernet51/2"}, {"name": "Ethernet51/3"}, {"name": "Ethernet51/4"}, {"name": "Ethernet52/1"}, {"name": "Ethernet52/2"}, {"name": "Ethernet52/3"}, {"name": "Ethernet52/4"}, {"name": "Loopback0"}, {"name": "Management1"}] -------------------------------------------------------------------------------- /outputs/facts/resources/switch1/interfaces.json: -------------------------------------------------------------------------------- 1 | [{"name": "Ethernet1", "enabled": false}, {"name": "Ethernet2", "enabled": false}, {"name": "Ethernet3", "description": "switch2 **** Ethernet2", "enabled": true}, {"name": "Ethernet4", "description": "switch3 **** Ethernet2", "enabled": true}, {"name": "Ethernet5", "enabled": false}, {"name": "Ethernet6", "enabled": false}, {"name": "Ethernet7", "enabled": false}, {"name": "Ethernet8", "enabled": false}, {"name": "Ethernet9", "enabled": false}, {"name": "Ethernet10", "enabled": false}, {"name": "Ethernet11", "enabled": false}, {"name": "Ethernet12", "enabled": false}, {"name": "Ethernet13", "enabled": false}, {"name": "Ethernet14", "enabled": false}, {"name": "Ethernet15", "enabled": false}, {"name": "Ethernet16", "enabled": false}, {"name": "Ethernet17", "enabled": false}, {"name": "Ethernet18", "enabled": false}, {"name": "Ethernet19", "enabled": false}, {"name": "Ethernet20", "enabled": false}, {"name": "Ethernet21", "enabled": false}, {"name": "Ethernet22", "enabled": false}, {"name": "Ethernet23", "enabled": false}, {"name": "Ethernet24", "enabled": false}, {"name": "Ethernet25", "enabled": false}, {"name": "Ethernet26", "enabled": false}, {"name": "Ethernet27", "enabled": false}, {"name": "Ethernet28", "enabled": false}, {"name": "Ethernet29", "enabled": false}, {"name": "Ethernet30", "enabled": false}, {"name": "Ethernet31", "enabled": false}, {"name": "Ethernet32", "enabled": false}, {"name": "Ethernet33", "enabled": false}, {"name": "Ethernet34", "enabled": false}, {"name": "Ethernet35", "enabled": false}, {"name": "Ethernet36", "enabled": false}, {"name": "Ethernet37", "enabled": false}, {"name": "Ethernet38", "enabled": false}, {"name": "Ethernet39", "enabled": false}, {"name": "Ethernet40", "enabled": false}, {"name": "Ethernet41", "enabled": false}, {"name": "Ethernet42", "enabled": false}, {"name": "Ethernet43", "enabled": false}, {"name": "Ethernet44", "enabled": false}, {"name": "Ethernet45", "enabled": false}, {"name": "Ethernet46", "enabled": false}, {"name": "Ethernet47", "enabled": false}, {"name": "Ethernet48", "enabled": false}, {"name": "Ethernet49/1", "enabled": false}, {"name": "Ethernet49/2", "enabled": false}, {"name": "Ethernet49/3", "enabled": false}, {"name": "Ethernet49/4", "enabled": false}, {"name": "Ethernet50/1", "enabled": false}, {"name": "Ethernet50/2", "enabled": false}, {"name": "Ethernet50/3", "enabled": false}, {"name": "Ethernet50/4", "enabled": false}, {"name": "Ethernet51/1", "enabled": false}, {"name": "Ethernet51/2", "enabled": false}, {"name": "Ethernet51/3", "enabled": false}, {"name": "Ethernet51/4", "enabled": false}, {"name": "Ethernet52/1", "enabled": false}, {"name": "Ethernet52/2", "enabled": false}, {"name": "Ethernet52/3", "enabled": false}, {"name": "Ethernet52/4", "enabled": false}, {"name": "Loopback0", "enabled": true}, {"name": "Management1", "enabled": true}] -------------------------------------------------------------------------------- /outputs/facts/resources/switch1/vlans.json: -------------------------------------------------------------------------------- 1 | [{"vlan_id": 10, "name": "red"}, {"vlan_id": 20, "name": "blue"}, {"vlan_id": 30, "name": "yellow"}, {"vlan_id": 40}] -------------------------------------------------------------------------------- /outputs/facts/resources/switch2/L2_interfaces.json: -------------------------------------------------------------------------------- 1 | [{"name": "Ethernet1"}, {"name": "Ethernet2"}, {"name": "Ethernet3"}, {"name": "Ethernet4"}, {"name": "Ethernet5"}, {"name": "Ethernet6"}, {"name": "Ethernet7"}, {"access": {"vlan": 20}, "name": "Ethernet8"}, {"access": {"vlan": 20}, "name": "Ethernet9"}, {"name": "Ethernet10", "trunk": {"native_vlan": 10, "trunk_allowed_vlans": ["20", "30", "40"]}}, {"name": "Ethernet11"}, {"name": "Ethernet12"}, {"name": "Ethernet13"}, {"name": "Ethernet14"}, {"name": "Ethernet15"}, {"name": "Ethernet16"}, {"name": "Ethernet17"}, {"name": "Ethernet18"}, {"name": "Ethernet19"}, {"name": "Ethernet20"}, {"name": "Ethernet21"}, {"name": "Ethernet22"}, {"name": "Ethernet23"}, {"name": "Ethernet24"}, {"name": "Ethernet25"}, {"name": "Ethernet26"}, {"name": "Ethernet27"}, {"name": "Ethernet28"}, {"name": "Ethernet29"}, {"name": "Ethernet30"}, {"name": "Ethernet31"}, {"name": "Ethernet32"}, {"name": "Ethernet33"}, {"name": "Ethernet34"}, {"name": "Ethernet35"}, {"name": "Ethernet36"}, {"name": "Ethernet37"}, {"name": "Ethernet38"}, {"name": "Ethernet39"}, {"name": "Ethernet40"}, {"name": "Ethernet41"}, {"name": "Ethernet42"}, {"name": "Ethernet43"}, {"name": "Ethernet44"}, {"name": "Ethernet45"}, {"name": "Ethernet46"}, {"name": "Ethernet47"}, {"name": "Ethernet48"}, {"name": "Ethernet49/1"}, {"name": "Ethernet49/2"}, {"name": "Ethernet49/3"}, {"name": "Ethernet49/4"}, {"name": "Ethernet50/1"}, {"name": "Ethernet50/2"}, {"name": "Ethernet50/3"}, {"name": "Ethernet50/4"}, {"name": "Ethernet51/1"}, {"name": "Ethernet51/2"}, {"name": "Ethernet51/3"}, {"name": "Ethernet51/4"}, {"name": "Ethernet52/1"}, {"name": "Ethernet52/2"}, {"name": "Ethernet52/3"}, {"name": "Ethernet52/4"}, {"name": "Loopback0"}, {"name": "Management1"}] -------------------------------------------------------------------------------- /outputs/facts/resources/switch2/interfaces.json: -------------------------------------------------------------------------------- 1 | [{"name": "Ethernet1", "enabled": false}, {"name": "Ethernet2", "description": "switch1 **** Ethernet3", "enabled": true}, {"name": "Ethernet3", "enabled": false}, {"name": "Ethernet4", "enabled": false}, {"name": "Ethernet5", "enabled": false}, {"name": "Ethernet6", "enabled": false}, {"name": "Ethernet7", "enabled": false}, {"name": "Ethernet8", "enabled": false}, {"name": "Ethernet9", "enabled": false}, {"name": "Ethernet10", "enabled": false}, {"name": "Ethernet11", "enabled": false}, {"name": "Ethernet12", "enabled": false}, {"name": "Ethernet13", "enabled": false}, {"name": "Ethernet14", "enabled": false}, {"name": "Ethernet15", "enabled": false}, {"name": "Ethernet16", "enabled": false}, {"name": "Ethernet17", "enabled": false}, {"name": "Ethernet18", "enabled": false}, {"name": "Ethernet19", "enabled": false}, {"name": "Ethernet20", "enabled": false}, {"name": "Ethernet21", "enabled": false}, {"name": "Ethernet22", "enabled": false}, {"name": "Ethernet23", "enabled": false}, {"name": "Ethernet24", "description": "switch3 **** Ethernet24", "enabled": true}, {"name": "Ethernet25", "enabled": false}, {"name": "Ethernet26", "enabled": false}, {"name": "Ethernet27", "enabled": false}, {"name": "Ethernet28", "enabled": false}, {"name": "Ethernet29", "enabled": false}, {"name": "Ethernet30", "enabled": false}, {"name": "Ethernet31", "enabled": false}, {"name": "Ethernet32", "enabled": false}, {"name": "Ethernet33", "enabled": false}, {"name": "Ethernet34", "enabled": false}, {"name": "Ethernet35", "enabled": false}, {"name": "Ethernet36", "enabled": false}, {"name": "Ethernet37", "enabled": false}, {"name": "Ethernet38", "enabled": false}, {"name": "Ethernet39", "enabled": false}, {"name": "Ethernet40", "enabled": false}, {"name": "Ethernet41", "enabled": false}, {"name": "Ethernet42", "enabled": false}, {"name": "Ethernet43", "enabled": false}, {"name": "Ethernet44", "enabled": false}, {"name": "Ethernet45", "enabled": false}, {"name": "Ethernet46", "enabled": false}, {"name": "Ethernet47", "enabled": false}, {"name": "Ethernet48", "enabled": false}, {"name": "Ethernet49/1", "enabled": false}, {"name": "Ethernet49/2", "enabled": false}, {"name": "Ethernet49/3", "enabled": false}, {"name": "Ethernet49/4", "enabled": false}, {"name": "Ethernet50/1", "enabled": false}, {"name": "Ethernet50/2", "enabled": false}, {"name": "Ethernet50/3", "enabled": false}, {"name": "Ethernet50/4", "enabled": false}, {"name": "Ethernet51/1", "enabled": false}, {"name": "Ethernet51/2", "enabled": false}, {"name": "Ethernet51/3", "enabled": false}, {"name": "Ethernet51/4", "enabled": false}, {"name": "Ethernet52/1", "enabled": false}, {"name": "Ethernet52/2", "enabled": false}, {"name": "Ethernet52/3", "enabled": false}, {"name": "Ethernet52/4", "enabled": false}, {"name": "Loopback0", "enabled": true}, {"name": "Management1", "enabled": true}] -------------------------------------------------------------------------------- /outputs/facts/resources/switch2/vlans.json: -------------------------------------------------------------------------------- 1 | [{"vlan_id": 10, "name": "red"}, {"vlan_id": 20, "name": "blue"}, {"vlan_id": 30, "name": "yellow"}] -------------------------------------------------------------------------------- /outputs/facts/resources/switch3/L2_interfaces.json: -------------------------------------------------------------------------------- 1 | [{"access": {"vlan": 20}, "name": "Ethernet1"}, {"name": "Ethernet2"}, {"access": {"vlan": 20}, "name": "Ethernet3"}, {"name": "Ethernet4", "trunk": {"native_vlan": 10, "trunk_allowed_vlans": ["20", "30", "40"]}}, {"name": "Ethernet5"}, {"name": "Ethernet6"}, {"name": "Ethernet7"}, {"name": "Ethernet8"}, {"name": "Ethernet9"}, {"name": "Ethernet10"}, {"name": "Ethernet11"}, {"name": "Ethernet12"}, {"name": "Ethernet13"}, {"name": "Ethernet14"}, {"name": "Ethernet15"}, {"name": "Ethernet16"}, {"name": "Ethernet17"}, {"name": "Ethernet18"}, {"name": "Ethernet19"}, {"name": "Ethernet20"}, {"name": "Ethernet21"}, {"name": "Ethernet22"}, {"name": "Ethernet23"}, {"name": "Ethernet24"}, {"name": "Ethernet25"}, {"name": "Ethernet26"}, {"name": "Ethernet27"}, {"name": "Ethernet28"}, {"name": "Ethernet29"}, {"name": "Ethernet30"}, {"name": "Ethernet31"}, {"name": "Ethernet32"}, {"name": "Ethernet33"}, {"name": "Ethernet34"}, {"name": "Ethernet35"}, {"name": "Ethernet36"}, {"name": "Ethernet37"}, {"name": "Ethernet38"}, {"name": "Ethernet39"}, {"name": "Ethernet40"}, {"name": "Ethernet41"}, {"name": "Ethernet42"}, {"name": "Ethernet43"}, {"name": "Ethernet44"}, {"name": "Ethernet45"}, {"name": "Ethernet46"}, {"name": "Ethernet47"}, {"name": "Ethernet48"}, {"name": "Ethernet49/1"}, {"name": "Ethernet49/2"}, {"name": "Ethernet49/3"}, {"name": "Ethernet49/4"}, {"name": "Ethernet50/1"}, {"name": "Ethernet50/2"}, {"name": "Ethernet50/3"}, {"name": "Ethernet50/4"}, {"name": "Ethernet51/1"}, {"name": "Ethernet51/2"}, {"name": "Ethernet51/3"}, {"name": "Ethernet51/4"}, {"name": "Ethernet52/1"}, {"name": "Ethernet52/2"}, {"name": "Ethernet52/3"}, {"name": "Ethernet52/4"}, {"name": "Loopback0"}, {"name": "Management1"}] -------------------------------------------------------------------------------- /outputs/facts/resources/switch3/interfaces.json: -------------------------------------------------------------------------------- 1 | [{"name": "Ethernet1", "enabled": false}, {"name": "Ethernet2", "description": "switch1 **** Ethernet4", "enabled": true}, {"name": "Ethernet3", "enabled": false}, {"name": "Ethernet4", "enabled": false}, {"name": "Ethernet5", "enabled": false}, {"name": "Ethernet6", "enabled": false}, {"name": "Ethernet7", "enabled": false}, {"name": "Ethernet8", "enabled": false}, {"name": "Ethernet9", "enabled": false}, {"name": "Ethernet10", "enabled": false}, {"name": "Ethernet11", "enabled": false}, {"name": "Ethernet12", "enabled": false}, {"name": "Ethernet13", "enabled": false}, {"name": "Ethernet14", "enabled": false}, {"name": "Ethernet15", "enabled": false}, {"name": "Ethernet16", "enabled": false}, {"name": "Ethernet17", "enabled": false}, {"name": "Ethernet18", "enabled": false}, {"name": "Ethernet19", "enabled": false}, {"name": "Ethernet20", "enabled": false}, {"name": "Ethernet21", "enabled": false}, {"name": "Ethernet22", "enabled": false}, {"name": "Ethernet23", "enabled": false}, {"name": "Ethernet24", "description": "switch2 **** Ethernet24", "enabled": true}, {"name": "Ethernet25", "enabled": false}, {"name": "Ethernet26", "enabled": false}, {"name": "Ethernet27", "enabled": false}, {"name": "Ethernet28", "enabled": false}, {"name": "Ethernet29", "enabled": false}, {"name": "Ethernet30", "enabled": false}, {"name": "Ethernet31", "enabled": false}, {"name": "Ethernet32", "enabled": false}, {"name": "Ethernet33", "enabled": false}, {"name": "Ethernet34", "enabled": false}, {"name": "Ethernet35", "enabled": false}, {"name": "Ethernet36", "enabled": false}, {"name": "Ethernet37", "enabled": false}, {"name": "Ethernet38", "enabled": false}, {"name": "Ethernet39", "enabled": false}, {"name": "Ethernet40", "enabled": false}, {"name": "Ethernet41", "enabled": false}, {"name": "Ethernet42", "enabled": false}, {"name": "Ethernet43", "enabled": false}, {"name": "Ethernet44", "enabled": false}, {"name": "Ethernet45", "enabled": false}, {"name": "Ethernet46", "enabled": false}, {"name": "Ethernet47", "enabled": false}, {"name": "Ethernet48", "enabled": false}, {"name": "Ethernet49/1", "enabled": false}, {"name": "Ethernet49/2", "enabled": false}, {"name": "Ethernet49/3", "enabled": false}, {"name": "Ethernet49/4", "enabled": false}, {"name": "Ethernet50/1", "enabled": false}, {"name": "Ethernet50/2", "enabled": false}, {"name": "Ethernet50/3", "enabled": false}, {"name": "Ethernet50/4", "enabled": false}, {"name": "Ethernet51/1", "enabled": false}, {"name": "Ethernet51/2", "enabled": false}, {"name": "Ethernet51/3", "enabled": false}, {"name": "Ethernet51/4", "enabled": false}, {"name": "Ethernet52/1", "enabled": false}, {"name": "Ethernet52/2", "enabled": false}, {"name": "Ethernet52/3", "enabled": false}, {"name": "Ethernet52/4", "enabled": false}, {"name": "Loopback0", "enabled": true}, {"name": "Management1", "enabled": true}] -------------------------------------------------------------------------------- /outputs/facts/resources/switch3/vlans.json: -------------------------------------------------------------------------------- 1 | [{"vlan_id": 10, "name": "red"}, {"vlan_id": 20, "name": "blue"}, {"vlan_id": 30, "name": "yellow"}] -------------------------------------------------------------------------------- /outputs/facts/running_config/switch1.txt: -------------------------------------------------------------------------------- 1 | ! Command: show running-config 2 | ! device: switch1 (DCS-7150S-64-CL, EOS-4.22.4M-2GB) 3 | ! 4 | ! boot system flash:/EOS.swi 5 | ! 6 | daemon TerminAttr 7 | exec /usr/bin/TerminAttr -ingestgrpcurl=10.83.29.224:9910 -taillogs -ingestauth=key,IngestKey -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -ingestexclude=/Sysdb/cell/1/agent,/Sysdb/cell/2/agent 8 | no shutdown 9 | ! 10 | load-interval default 5 11 | ! 12 | transceiver qsfp default-mode 4x10G 13 | ! 14 | queue-monitor length 15 | ! 16 | logging host 10.83.28.52 17 | ! 18 | hostname switch1 19 | ip name-server vrf default 10.83.28.52 20 | ip name-server vrf default 10.83.29.222 21 | ip domain-name lab.local 22 | ! 23 | ntp server 10.83.28.52 24 | ! 25 | snmp-server community private rw 26 | snmp-server community public ro 27 | ! 28 | spanning-tree mode mstp 29 | ! 30 | aaa authorization exec default local 31 | ! 32 | no aaa root 33 | aaa authentication policy local allow-nopassword-remote-login 34 | ! 35 | username admin privilege 15 role network-admin nopassword 36 | username ansible privilege 15 secret sha512 $6$0DoDLGn9HJUMZ5o1$mbB2btAhRH084BiPEWMwdhOy3kBHKDNf9.yy9Cx3s/t8PNQrBhOqCiOTOwkdQhc/yuWIG0ROal30GWs7OgRDI. 37 | username cvp-infra privilege 15 secret sha512 $6$.I7/ZR/zlLIUv8fr$vR/JvLTbq5amMt6Y1SE4CKlPDv/AzJYlFYHkUZ17BDovm0Oi4aLdBULe1EmZ0Y9xKjVLMKpxCSKmlrAioDxbQ0 38 | username switch-infra privilege 15 nopassword 39 | username telemetry secret 5 $1$7ksxaeUt$.JJMVbNtjZVxakZqvo0dy1 40 | ! 41 | vlan 10 42 | name red 43 | ! 44 | vlan 20 45 | name blue 46 | ! 47 | vlan 30 48 | name yellow 49 | ! 50 | vlan 40 51 | ! 52 | interface Ethernet1 53 | shutdown 54 | ! 55 | interface Ethernet2 56 | shutdown 57 | ! 58 | interface Ethernet3 59 | no switchport 60 | ip address 10.10.10.0/31 61 | ! 62 | interface Ethernet4 63 | no switchport 64 | ip address 10.10.10.2/31 65 | ! 66 | interface Ethernet5 67 | shutdown 68 | switchport access vlan 30 69 | ! 70 | interface Ethernet6 71 | shutdown 72 | switchport access vlan 40 73 | ! 74 | interface Ethernet7 75 | shutdown 76 | switchport trunk native vlan 10 77 | switchport trunk allowed vlan 20,30,40 78 | ! 79 | interface Ethernet8 80 | shutdown 81 | ! 82 | interface Ethernet9 83 | shutdown 84 | ! 85 | interface Ethernet10 86 | shutdown 87 | ! 88 | interface Ethernet11 89 | shutdown 90 | ! 91 | interface Ethernet12 92 | shutdown 93 | ! 94 | interface Ethernet13 95 | shutdown 96 | ! 97 | interface Ethernet14 98 | shutdown 99 | ! 100 | interface Ethernet15 101 | shutdown 102 | ! 103 | interface Ethernet16 104 | shutdown 105 | ! 106 | interface Ethernet17 107 | shutdown 108 | ! 109 | interface Ethernet18 110 | shutdown 111 | ! 112 | interface Ethernet19 113 | shutdown 114 | ! 115 | interface Ethernet20 116 | shutdown 117 | ! 118 | interface Ethernet21 119 | shutdown 120 | ! 121 | interface Ethernet22 122 | shutdown 123 | ! 124 | interface Ethernet23 125 | shutdown 126 | ! 127 | interface Ethernet24 128 | shutdown 129 | ! 130 | interface Ethernet25 131 | shutdown 132 | ! 133 | interface Ethernet26 134 | shutdown 135 | ! 136 | interface Ethernet27 137 | shutdown 138 | ! 139 | interface Ethernet28 140 | shutdown 141 | ! 142 | interface Ethernet29 143 | shutdown 144 | ! 145 | interface Ethernet30 146 | shutdown 147 | ! 148 | interface Ethernet31 149 | shutdown 150 | ! 151 | interface Ethernet32 152 | shutdown 153 | ! 154 | interface Ethernet33 155 | shutdown 156 | ! 157 | interface Ethernet34 158 | shutdown 159 | ! 160 | interface Ethernet35 161 | shutdown 162 | ! 163 | interface Ethernet36 164 | shutdown 165 | ! 166 | interface Ethernet37 167 | shutdown 168 | ! 169 | interface Ethernet38 170 | shutdown 171 | ! 172 | interface Ethernet39 173 | shutdown 174 | ! 175 | interface Ethernet40 176 | shutdown 177 | ! 178 | interface Ethernet41 179 | shutdown 180 | ! 181 | interface Ethernet42 182 | shutdown 183 | ! 184 | interface Ethernet43 185 | shutdown 186 | ! 187 | interface Ethernet44 188 | shutdown 189 | ! 190 | interface Ethernet45 191 | shutdown 192 | ! 193 | interface Ethernet46 194 | shutdown 195 | ! 196 | interface Ethernet47 197 | shutdown 198 | ! 199 | interface Ethernet48 200 | shutdown 201 | ! 202 | interface Ethernet49/1 203 | shutdown 204 | ! 205 | interface Ethernet49/2 206 | shutdown 207 | ! 208 | interface Ethernet49/3 209 | shutdown 210 | ! 211 | interface Ethernet49/4 212 | shutdown 213 | ! 214 | interface Ethernet50/1 215 | shutdown 216 | ! 217 | interface Ethernet50/2 218 | shutdown 219 | ! 220 | interface Ethernet50/3 221 | shutdown 222 | ! 223 | interface Ethernet50/4 224 | shutdown 225 | ! 226 | interface Ethernet51/1 227 | shutdown 228 | ! 229 | interface Ethernet51/2 230 | shutdown 231 | ! 232 | interface Ethernet51/3 233 | shutdown 234 | ! 235 | interface Ethernet51/4 236 | shutdown 237 | ! 238 | interface Ethernet52/1 239 | shutdown 240 | ! 241 | interface Ethernet52/2 242 | shutdown 243 | ! 244 | interface Ethernet52/3 245 | shutdown 246 | ! 247 | interface Ethernet52/4 248 | shutdown 249 | ! 250 | interface Loopback0 251 | ip address 172.16.0.1/32 252 | ! 253 | interface Management1 254 | ip address 10.83.28.123/22 255 | ! 256 | ip route 0.0.0.0/0 10.83.28.1 257 | ! 258 | ip routing 259 | ! 260 | router bgp 65001 261 | neighbor 10.10.10.1 remote-as 65002 262 | neighbor 10.10.10.1 maximum-routes 12000 263 | neighbor 10.10.10.3 remote-as 65003 264 | neighbor 10.10.10.3 maximum-routes 12000 265 | redistribute connected 266 | ! 267 | management api http-commands 268 | protocol http 269 | no shutdown 270 | ! 271 | end -------------------------------------------------------------------------------- /outputs/facts/running_config/switch2.txt: -------------------------------------------------------------------------------- 1 | ! Command: show running-config 2 | ! device: switch2 (DCS-7150S-64-CL, EOS-4.22.4M-2GB) 3 | ! 4 | ! boot system flash:/EOS.swi 5 | ! 6 | daemon TerminAttr 7 | exec /usr/bin/TerminAttr -ingestgrpcurl=10.83.29.224:9910 -taillogs -ingestauth=key,IngestKey -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -ingestexclude=/Sysdb/cell/1/agent,/Sysdb/cell/2/agent 8 | no shutdown 9 | ! 10 | load-interval default 5 11 | ! 12 | transceiver qsfp default-mode 4x10G 13 | ! 14 | queue-monitor length 15 | ! 16 | logging host 10.83.28.52 17 | ! 18 | hostname switch2 19 | ip name-server vrf default 10.83.28.52 20 | ip name-server vrf default 10.83.29.222 21 | ip domain-name lab.local 22 | ! 23 | ntp server 10.83.28.52 24 | ! 25 | snmp-server community public ro 26 | ! 27 | spanning-tree mode mstp 28 | ! 29 | aaa authorization exec default local 30 | ! 31 | no aaa root 32 | aaa authentication policy local allow-nopassword-remote-login 33 | ! 34 | username admin privilege 15 role network-admin nopassword 35 | username ansible privilege 15 secret sha512 $6$kF4LcqnNXScyWdD.$d4/BTBXRDDYvvGXzgtHWXD41yP25Q/KhVeCueMkOVCv/bEv8rL74BRIvGpo0EHZBoWamWXeR.n3Mq2k2vorOw1 36 | username telemetry secret 5 $1$aVYVFaqH$W8oKA8utuEKVf8wcB1SLz. 37 | ! 38 | vlan 10 39 | name red 40 | ! 41 | vlan 20 42 | name blue 43 | ! 44 | vlan 30 45 | name yellow 46 | ! 47 | interface Ethernet1 48 | shutdown 49 | ! 50 | interface Ethernet2 51 | no switchport 52 | ip address 10.10.10.1/31 53 | ! 54 | interface Ethernet3 55 | shutdown 56 | ! 57 | interface Ethernet4 58 | shutdown 59 | ! 60 | interface Ethernet5 61 | shutdown 62 | ! 63 | interface Ethernet6 64 | shutdown 65 | ! 66 | interface Ethernet7 67 | shutdown 68 | ! 69 | interface Ethernet8 70 | shutdown 71 | switchport access vlan 20 72 | ! 73 | interface Ethernet9 74 | shutdown 75 | switchport access vlan 20 76 | ! 77 | interface Ethernet10 78 | shutdown 79 | switchport trunk native vlan 10 80 | switchport trunk allowed vlan 20,30,40 81 | ! 82 | interface Ethernet11 83 | shutdown 84 | ! 85 | interface Ethernet12 86 | shutdown 87 | ! 88 | interface Ethernet13 89 | shutdown 90 | ! 91 | interface Ethernet14 92 | shutdown 93 | ! 94 | interface Ethernet15 95 | shutdown 96 | ! 97 | interface Ethernet16 98 | shutdown 99 | ! 100 | interface Ethernet17 101 | shutdown 102 | ! 103 | interface Ethernet18 104 | shutdown 105 | ! 106 | interface Ethernet19 107 | shutdown 108 | ! 109 | interface Ethernet20 110 | shutdown 111 | ! 112 | interface Ethernet21 113 | shutdown 114 | ! 115 | interface Ethernet22 116 | shutdown 117 | ! 118 | interface Ethernet23 119 | shutdown 120 | ! 121 | interface Ethernet24 122 | no switchport 123 | ip address 10.10.10.4/31 124 | ! 125 | interface Ethernet25 126 | shutdown 127 | ! 128 | interface Ethernet26 129 | shutdown 130 | ! 131 | interface Ethernet27 132 | shutdown 133 | ! 134 | interface Ethernet28 135 | shutdown 136 | ! 137 | interface Ethernet29 138 | shutdown 139 | ! 140 | interface Ethernet30 141 | shutdown 142 | ! 143 | interface Ethernet31 144 | shutdown 145 | ! 146 | interface Ethernet32 147 | shutdown 148 | ! 149 | interface Ethernet33 150 | shutdown 151 | ! 152 | interface Ethernet34 153 | shutdown 154 | ! 155 | interface Ethernet35 156 | shutdown 157 | ! 158 | interface Ethernet36 159 | shutdown 160 | ! 161 | interface Ethernet37 162 | shutdown 163 | ! 164 | interface Ethernet38 165 | shutdown 166 | ! 167 | interface Ethernet39 168 | shutdown 169 | ! 170 | interface Ethernet40 171 | shutdown 172 | ! 173 | interface Ethernet41 174 | shutdown 175 | ! 176 | interface Ethernet42 177 | shutdown 178 | ! 179 | interface Ethernet43 180 | shutdown 181 | ! 182 | interface Ethernet44 183 | shutdown 184 | ! 185 | interface Ethernet45 186 | shutdown 187 | ! 188 | interface Ethernet46 189 | shutdown 190 | ! 191 | interface Ethernet47 192 | shutdown 193 | ! 194 | interface Ethernet48 195 | shutdown 196 | ! 197 | interface Ethernet49/1 198 | shutdown 199 | ! 200 | interface Ethernet49/2 201 | shutdown 202 | ! 203 | interface Ethernet49/3 204 | shutdown 205 | ! 206 | interface Ethernet49/4 207 | shutdown 208 | ! 209 | interface Ethernet50/1 210 | shutdown 211 | ! 212 | interface Ethernet50/2 213 | shutdown 214 | ! 215 | interface Ethernet50/3 216 | shutdown 217 | ! 218 | interface Ethernet50/4 219 | shutdown 220 | ! 221 | interface Ethernet51/1 222 | shutdown 223 | ! 224 | interface Ethernet51/2 225 | shutdown 226 | ! 227 | interface Ethernet51/3 228 | shutdown 229 | ! 230 | interface Ethernet51/4 231 | shutdown 232 | ! 233 | interface Ethernet52/1 234 | shutdown 235 | ! 236 | interface Ethernet52/2 237 | shutdown 238 | ! 239 | interface Ethernet52/3 240 | shutdown 241 | ! 242 | interface Ethernet52/4 243 | shutdown 244 | ! 245 | interface Loopback0 246 | ip address 172.16.0.2/32 247 | ! 248 | interface Management1 249 | ip address 10.83.28.124/22 250 | ! 251 | ip route 0.0.0.0/0 10.83.28.1 252 | ! 253 | ip routing 254 | ! 255 | router bgp 65002 256 | router-id 172.16.10.2 257 | neighbor 10.10.10.0 remote-as 65001 258 | neighbor 10.10.10.0 maximum-routes 12000 259 | neighbor 10.10.10.5 remote-as 65003 260 | neighbor 10.10.10.5 maximum-routes 12000 261 | redistribute connected 262 | ! 263 | management api http-commands 264 | protocol http 265 | no shutdown 266 | ! 267 | end -------------------------------------------------------------------------------- /outputs/facts/running_config/switch3.txt: -------------------------------------------------------------------------------- 1 | ! Command: show running-config 2 | ! device: switch3 (DCS-7150S-64-CL, EOS-4.18.11M-2GB) 3 | ! 4 | ! boot system flash:/EOS.swi 5 | ! 6 | daemon TerminAttr 7 | exec /usr/bin/TerminAttr -ingestgrpcurl=10.83.29.224:9910 -taillogs -ingestauth=key,IngestKey -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -ingestexclude=/Sysdb/cell/1/agent,/Sysdb/cell/2/agent 8 | no shutdown 9 | ! 10 | load-interval default 5 11 | ! 12 | transceiver qsfp default-mode 4x10G 13 | ! 14 | queue-monitor length 15 | ! 16 | logging host 10.83.28.52 17 | ! 18 | hostname switch3 19 | ip name-server vrf default 10.83.28.52 20 | ip name-server vrf default 10.83.29.222 21 | ip domain-name lab.local 22 | ! 23 | ntp server 10.83.28.52 24 | ! 25 | snmp-server community private rw 26 | snmp-server community public ro 27 | ! 28 | spanning-tree mode mstp 29 | ! 30 | aaa authorization exec default local 31 | ! 32 | no aaa root 33 | aaa authentication policy local allow-nopassword-remote-login 34 | ! 35 | username admin privilege 15 role network-admin nopassword 36 | username ansible privilege 15 secret sha512 $6$iqjO8r.SFB1kV1fW$hfZ6x8KuSBPP6VfAS.2ZcCQhyqY3E8rrH3j.4ITw9vltYModDM7fsAmZ5k7Hke/yu/kVS7mk8qhaHnRPH7EAW/ 37 | username cvp-infra privilege 15 secret sha512 $6$.I7/ZR/zlLIUv8fr$vR/JvLTbq5amMt6Y1SE4CKlPDv/AzJYlFYHkUZ17BDovm0Oi4aLdBULe1EmZ0Y9xKjVLMKpxCSKmlrAioDxbQ0 38 | username switch-infra privilege 15 nopassword 39 | username telemetry secret 5 $1$7ksxaeUt$.JJMVbNtjZVxakZqvo0dy1 40 | ! 41 | vlan 10 42 | name red 43 | ! 44 | vlan 20 45 | name blue 46 | ! 47 | vlan 30 48 | name yellow 49 | ! 50 | interface Ethernet1 51 | shutdown 52 | ! 53 | interface Ethernet2 54 | no switchport 55 | ip address 10.10.10.3/31 56 | ! 57 | interface Ethernet3 58 | shutdown 59 | ! 60 | interface Ethernet4 61 | shutdown 62 | ! 63 | interface Ethernet5 64 | shutdown 65 | ! 66 | interface Ethernet6 67 | shutdown 68 | ! 69 | interface Ethernet7 70 | shutdown 71 | ! 72 | interface Ethernet8 73 | shutdown 74 | ! 75 | interface Ethernet9 76 | shutdown 77 | ! 78 | interface Ethernet10 79 | shutdown 80 | ! 81 | interface Ethernet11 82 | shutdown 83 | ! 84 | interface Ethernet12 85 | shutdown 86 | ! 87 | interface Ethernet13 88 | shutdown 89 | ! 90 | interface Ethernet14 91 | shutdown 92 | ! 93 | interface Ethernet15 94 | shutdown 95 | ! 96 | interface Ethernet16 97 | shutdown 98 | ! 99 | interface Ethernet17 100 | shutdown 101 | ! 102 | interface Ethernet18 103 | shutdown 104 | ! 105 | interface Ethernet19 106 | shutdown 107 | ! 108 | interface Ethernet20 109 | shutdown 110 | ! 111 | interface Ethernet21 112 | shutdown 113 | ! 114 | interface Ethernet22 115 | shutdown 116 | ! 117 | interface Ethernet23 118 | shutdown 119 | ! 120 | interface Ethernet24 121 | no switchport 122 | ip address 10.10.10.5/31 123 | ! 124 | interface Ethernet25 125 | shutdown 126 | ! 127 | interface Ethernet26 128 | shutdown 129 | ! 130 | interface Ethernet27 131 | shutdown 132 | ! 133 | interface Ethernet28 134 | shutdown 135 | ! 136 | interface Ethernet29 137 | shutdown 138 | ! 139 | interface Ethernet30 140 | shutdown 141 | ! 142 | interface Ethernet31 143 | shutdown 144 | ! 145 | interface Ethernet32 146 | shutdown 147 | ! 148 | interface Ethernet33 149 | shutdown 150 | ! 151 | interface Ethernet34 152 | shutdown 153 | ! 154 | interface Ethernet35 155 | shutdown 156 | ! 157 | interface Ethernet36 158 | shutdown 159 | ! 160 | interface Ethernet37 161 | shutdown 162 | ! 163 | interface Ethernet38 164 | shutdown 165 | ! 166 | interface Ethernet39 167 | shutdown 168 | ! 169 | interface Ethernet40 170 | shutdown 171 | ! 172 | interface Ethernet41 173 | shutdown 174 | ! 175 | interface Ethernet42 176 | shutdown 177 | ! 178 | interface Ethernet43 179 | shutdown 180 | ! 181 | interface Ethernet44 182 | shutdown 183 | ! 184 | interface Ethernet45 185 | shutdown 186 | ! 187 | interface Ethernet46 188 | shutdown 189 | ! 190 | interface Ethernet47 191 | shutdown 192 | ! 193 | interface Ethernet48 194 | shutdown 195 | ! 196 | interface Ethernet49/1 197 | shutdown 198 | ! 199 | interface Ethernet49/2 200 | shutdown 201 | ! 202 | interface Ethernet49/3 203 | shutdown 204 | ! 205 | interface Ethernet49/4 206 | shutdown 207 | ! 208 | interface Ethernet50/1 209 | shutdown 210 | ! 211 | interface Ethernet50/2 212 | shutdown 213 | ! 214 | interface Ethernet50/3 215 | shutdown 216 | ! 217 | interface Ethernet50/4 218 | shutdown 219 | ! 220 | interface Ethernet51/1 221 | shutdown 222 | ! 223 | interface Ethernet51/2 224 | shutdown 225 | ! 226 | interface Ethernet51/3 227 | shutdown 228 | ! 229 | interface Ethernet51/4 230 | shutdown 231 | ! 232 | interface Ethernet52/1 233 | shutdown 234 | ! 235 | interface Ethernet52/2 236 | shutdown 237 | ! 238 | interface Ethernet52/3 239 | shutdown 240 | ! 241 | interface Ethernet52/4 242 | shutdown 243 | ! 244 | interface Loopback0 245 | ip address 172.16.0.3/32 246 | ! 247 | interface Management1 248 | ip address 10.83.28.125/22 249 | ! 250 | ip route 0.0.0.0/0 10.83.28.1 251 | ! 252 | ip routing 253 | ! 254 | router bgp 65003 255 | maximum-paths 2 ecmp 2 256 | neighbor 10.10.10.2 remote-as 65001 257 | neighbor 10.10.10.2 maximum-routes 12000 258 | neighbor 10.10.10.4 remote-as 65002 259 | neighbor 10.10.10.4 maximum-routes 12000 260 | redistribute connected 261 | ! 262 | management api http-commands 263 | protocol http 264 | no shutdown 265 | ! 266 | end -------------------------------------------------------------------------------- /playbook_backup_configuration.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Make sure the required directory exists 3 | hosts: localhost 4 | gather_facts: false 5 | 6 | tasks: 7 | 8 | - name: Make sure the required directory exists 9 | file: 10 | path: "{{save_dir}}/backup" 11 | state: directory 12 | check_mode: no 13 | 14 | - name: backup EOS conf 15 | hosts: eos 16 | connection: httpapi 17 | gather_facts: false 18 | 19 | tasks: 20 | 21 | - name: backup EOS conf 22 | eos_config: 23 | backup: yes 24 | backup_options: 25 | dir_path: "{{save_dir}}/backup" 26 | 27 | -------------------------------------------------------------------------------- /playbook_collect_commands.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Run commands on remote EOS devices and save the output 3 | hosts: eos 4 | connection: httpapi 5 | gather_facts: false 6 | 7 | tasks: 8 | 9 | - name: Create output directory for each EOS device 10 | file: 11 | path: "{{save_dir}}/cli/{{inventory_hostname}}" 12 | state: directory 13 | 14 | - name: run show commands on remote EOS devices 15 | eos_command: 16 | commands: "{{item}}" 17 | with_items: "{{cli_to_collect}}" 18 | register: cli_output 19 | 20 | - name: copy commands output in the save directory 21 | copy: 22 | content: "{{ item.stdout.0 }}" 23 | dest: "{{save_dir}}/cli/{{inventory_hostname}}/{{item.item}}.txt" 24 | loop: "{{ cli_output.results }}" 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /playbook_collect_facts_config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Make sure the facts directory exists 3 | hosts: localhost 4 | gather_facts: false 5 | 6 | tasks: 7 | 8 | - name: Make sure the facts directory exists 9 | file: 10 | path: "{{save_dir}}/facts/running_config" 11 | state: directory 12 | 13 | - name: collect facts from eos devices 14 | hosts: eos 15 | connection: network_cli 16 | gather_facts: false 17 | 18 | tasks: 19 | - name: collect facts from EOS devices 20 | eos_facts: 21 | gather_subset: config 22 | register: facts 23 | 24 | - name: copy running configuration in the facts directory 25 | copy: 26 | content: "{{facts.ansible_facts.ansible_net_config}}" 27 | dest: "{{save_dir}}/facts/running_config/{{inventory_hostname}}.txt" 28 | -------------------------------------------------------------------------------- /playbook_collect_facts_hardware.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Make sure the facts directory exists 3 | hosts: localhost 4 | gather_facts: false 5 | 6 | tasks: 7 | 8 | - name: Make sure the facts directory exists 9 | file: 10 | path: "{{save_dir}}/facts/hardware" 11 | state: directory 12 | 13 | - name: collect facts from EOS devices and display some details 14 | hosts: eos 15 | connection: network_cli 16 | gather_facts: false 17 | 18 | tasks: 19 | - name: collect facts from EOS devices 20 | eos_facts: 21 | gather_subset: hardware 22 | register: facts 23 | 24 | - name: copy facts in the facts directory 25 | copy: 26 | content: "{{facts.ansible_facts}}" 27 | dest: "{{save_dir}}/facts/hardware/{{inventory_hostname}}.json" 28 | 29 | - name: Display some facts 30 | debug: 31 | msg: "The device {{facts.ansible_facts.ansible_net_hostname}} is a {{facts.ansible_facts.ansible_net_model}} model running the version {{facts.ansible_facts.ansible_net_version}}" 32 | -------------------------------------------------------------------------------- /playbook_collect_facts_resources.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Make sure the facts directory exists 4 | hosts: localhost 5 | gather_facts: false 6 | 7 | tasks: 8 | 9 | - name: Make sure the facts directory exists 10 | file: 11 | path: "{{save_dir}}/facts/resources" 12 | state: directory 13 | 14 | - name: collect facts from EOS devices and display some details 15 | hosts: eos 16 | connection: network_cli 17 | gather_facts: false 18 | 19 | tasks: 20 | 21 | - name: Make sure a directory exists for each device 22 | file: 23 | path: "{{save_dir}}/facts/resources/{{inventory_hostname}}" 24 | state: directory 25 | 26 | - name: collect facts from EOS devices 27 | eos_facts: 28 | gather_network_resources: 29 | - interfaces 30 | - l2_interfaces 31 | - vlans 32 | register: resources 33 | 34 | - name: copy interfaces resources in the device directory 35 | copy: 36 | content: "{{resources.ansible_facts.ansible_network_resources.interfaces}}" 37 | dest: "{{save_dir}}/facts/resources/{{inventory_hostname}}/interfaces.json" 38 | 39 | - name: copy vlans resources in the device directory 40 | copy: 41 | content: "{{resources.ansible_facts.ansible_network_resources.vlans}}" 42 | dest: "{{save_dir}}/facts/resources/{{inventory_hostname}}/vlans.json" 43 | 44 | - name: copy L2 interfaces resources in the device directory 45 | copy: 46 | content: "{{resources.ansible_facts.ansible_network_resources.l2_interfaces}}" 47 | dest: "{{save_dir}}/facts/resources/{{inventory_hostname}}/L2_interfaces.json" 48 | -------------------------------------------------------------------------------- /playbook_configure_login_banner.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: configure the login banner 3 | hosts: eos 4 | gather_facts: false 5 | connection: httpapi 6 | 7 | tasks: 8 | - name: configure the login banner 9 | eos_banner: 10 | banner: login 11 | text: "{{login_banner}}" 12 | state: present 13 | 14 | -------------------------------------------------------------------------------- /playbook_configure_using_files.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Make sure the required directory exists 3 | hosts: localhost 4 | gather_facts: false 5 | 6 | tasks: 7 | 8 | - name: Make sure the required directory exists 9 | file: 10 | path: "{{save_dir}}/conf_generated" 11 | state: directory 12 | check_mode: no 13 | 14 | - name: configure EOS devices 15 | hosts: eos 16 | connection: httpapi 17 | gather_facts: false 18 | 19 | tasks: 20 | 21 | - name: generate EOS configuration from a template 22 | template: 23 | src: "{{playbook_dir}}/templates/config.j2" 24 | dest: "{{save_dir}}/conf_generated/{{ inventory_hostname }}.cfg" 25 | trim_blocks: yes 26 | check_mode: no 27 | 28 | - name: configure EOS devices 29 | eos_config: 30 | src: "{{ playbook_dir }}/outputs/conf_generated/{{ inventory_hostname }}.cfg" 31 | diff_against: session 32 | backup: no 33 | backup_options: 34 | dir_path: "{{ playbook_dir }}/backup" 35 | 36 | -------------------------------------------------------------------------------- /playbook_configure_using_lines.yml: -------------------------------------------------------------------------------- 1 | - name: configure lines on EOS devices 2 | hosts: switch1 3 | connection: httpapi 4 | gather_facts: false 5 | 6 | tasks: 7 | 8 | - name: configure lines on EOS devices 9 | eos_config: 10 | parents: interface Ethernet8 11 | lines: 12 | - description "testing ansible module eos_config" 13 | - switchport mode access 14 | - no shutdown 15 | diff_against: session 16 | 17 | -------------------------------------------------------------------------------- /playbook_enable_http_api.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Use CLI to enable eAPI 3 | hosts: eos 4 | connection: network_cli 5 | gather_facts: false 6 | 7 | tasks: 8 | - name: Enable eAPI with HTTP at port 80 9 | eos_eapi: 10 | state: started 11 | http: true 12 | http_port: 80 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /playbook_generate_audit_report.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Delete previous reports and create audit directories 3 | hosts: localhost 4 | gather_facts: false 5 | tags: 6 | - clean 7 | 8 | tasks: 9 | 10 | - name: delete the audit directory 11 | file: 12 | path: "{{save_dir}}/audit" 13 | state: absent 14 | 15 | - name: make sure the audit directories exist 16 | file: 17 | path: "{{save_dir}}/audit/fragments" 18 | state: directory 19 | 20 | - name: collect data on EOS devices and generate an audit report file for each device 21 | hosts: eos 22 | connection: httpapi 23 | gather_facts: false 24 | 25 | tasks: 26 | 27 | - name: collect devices details 28 | eos_command: 29 | commands: "show version | json" 30 | register: registered_version 31 | 32 | - name: collect power supplies status 33 | eos_command: 34 | commands: "show environment power | json" 35 | register: registered_power 36 | 37 | - name: collect fan status 38 | eos_command: 39 | commands: "show environment cooling | json" 40 | register: registered_fan 41 | 42 | - name: validate temperature 43 | eos_command: 44 | commands: "show environment temperature | json" 45 | register: registered_temperature 46 | 47 | - name: collect interfaces details 48 | eos_command: 49 | commands: "show interfaces {{item.interface}} description | json" 50 | loop: "{{topology}}" 51 | when: (item.interface is defined) and ((ansible_version['major'] == 2 and ansible_version['minor']|int >= 9)) 52 | register: registered_interfaces 53 | 54 | - name: collect LLDP details 55 | eos_command: 56 | commands: "show lldp neighbors {{item.interface}} | json" 57 | loop: "{{topology}}" 58 | when: (item.interface is defined) and (item.lldp_neighbor is defined) and ((ansible_version['major'] == 2 and ansible_version['minor']|int >= 9)) 59 | register: registered_lldp 60 | 61 | - name: run ping to EBGP peers (directly connected) 62 | eos_command: 63 | commands: "ping {{ item.ebgp_peer_ip }} source {{ item.ip }} repeat 1" 64 | loop: "{{topology}}" 65 | register: registered_icmp_ebgp 66 | 67 | - name: collect BGP details 68 | eos_command: 69 | commands: "show ip bgp neighbors {{item.ebgp_peer_ip}} | json" 70 | loop: "{{topology}}" 71 | when: (item.ebgp_peer_ip is defined) and ((ansible_version['major'] == 2 and ansible_version['minor']|int >= 9)) 72 | register: registered_bgp 73 | 74 | - name: collect routing table for EBGP peers loopback 75 | eos_command: 76 | commands: "show ip route {{ item.ebgp_peer_loopback + ('/32') }} | json" 77 | loop: "{{topology}}" 78 | when: (item.ebgp_peer_loopback is defined) and ((ansible_version['major'] == 2 and ansible_version['minor']|int >= 9)) 79 | register: registered_routing 80 | 81 | - name: run ping from a local interface to EBGP peers loopback 82 | eos_command: 83 | commands: "ping {{ item.ebgp_peer_loopback }} source {{ item.ip }} repeat 1 " 84 | loop: "{{topology}}" 85 | when: (item.ebgp_peer_loopback is defined) and (item.ip is defined) 86 | register: registered_icmp_from_local_to_ebgp_loopback 87 | 88 | - name: run ping from local loopback to EBGP peers loopback 89 | eos_command: 90 | commands: "ping {{ item.ebgp_peer_loopback }} source {{ loopback }} repeat 1 " 91 | loop: "{{topology}}" 92 | when: (item.ebgp_peer_loopback is defined) 93 | register: registered_icmp_from_loopback_to_ebgp_loopback 94 | 95 | - name: generate report files from a template for each device 96 | template: 97 | src: "{{playbook_dir}}/templates/audit_report.j2" 98 | dest: "{{save_dir}}/audit/fragments/{{inventory_hostname}}.md" 99 | lstrip_blocks: yes 100 | 101 | - name: assemble all reports 102 | hosts: localhost 103 | gather_facts: false 104 | 105 | tasks: 106 | 107 | - name: generate report file structure from a template 108 | template: 109 | src: "{{playbook_dir}}/templates/audit_report_structure.j2" 110 | dest: "{{save_dir}}/audit/fragments/_audit_report_structure.md" 111 | 112 | - name: Assembling all reports 113 | assemble: 114 | src: "{{save_dir}}/audit/fragments" 115 | dest: "{{save_dir}}/audit/report.md" 116 | delimiter: '***************************************************' 117 | 118 | - name: include timestamp at beginning of report file 119 | lineinfile: 120 | path: "{{save_dir}}/audit/report.md" 121 | line: "Report generated with Ansible ({{ lookup('pipe','date') }})\n" 122 | insertbefore: BOF 123 | -------------------------------------------------------------------------------- /playbook_manage_vlans.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Configure VLANS and L2 interfaces 3 | hosts: eos 4 | connection: network_cli 5 | gather_facts: false 6 | 7 | tasks: 8 | 9 | - name: Configure VLANS 10 | eos_vlans: 11 | config: "{{ vlans }}" 12 | state: overridden 13 | when: (vlans is defined) 14 | 15 | - name: Configure L2 interfaces 16 | eos_l2_interfaces: 17 | config: "{{ l2_interfaces }}" 18 | state: overridden 19 | when: (l2_interfaces is defined) 20 | 21 | 22 | -------------------------------------------------------------------------------- /playbook_print_version_and_model.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: print EOS version and HW model 3 | hosts: eos 4 | connection: httpapi 5 | gather_facts: false 6 | 7 | tasks: 8 | 9 | - name: run show version on EOS devices 10 | eos_command: 11 | commands: "show version | json" 12 | register: eos_version 13 | 14 | - name: Print some details regarding EOS devices 15 | debug: 16 | msg: "The device {{ inventory_hostname }} is a {{eos_version.stdout_lines.0.modelName}} model running EOS version {{eos_version.stdout_lines.0.version}}" 17 | -------------------------------------------------------------------------------- /playbook_validate_states.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: validate states on EOS devices 3 | hosts: eos 4 | connection: httpapi 5 | gather_facts: false 6 | tags: 7 | - audit 8 | 9 | roles: 10 | - validate_device_model_and_SW_release 11 | - validate_environment 12 | - validate_interfaces_status 13 | - validate_lldp_neighbors 14 | - validate_bgp_neigbhbors 15 | - validate_routing_table 16 | - validate_ip_reachability 17 | 18 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | ansible==2.9.7 2 | paramiko==2.7.1 -------------------------------------------------------------------------------- /roles/validate_bgp_neigbhbors/README.md: -------------------------------------------------------------------------------- 1 | - validate EBGP sessions are Established 2 | - validate some ipv4 prefixes are sent to each EBGP neighbor (at least 1 prefix) 3 | - validate some ipv4 prefixes are received from each EBGP neighbor (at least 1 prefix) -------------------------------------------------------------------------------- /roles/validate_bgp_neigbhbors/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: validate EBGP sessions state 3 | eos_command: 4 | commands: "show ip bgp neighbors {{item.ebgp_peer_ip}} | json" 5 | waitfor: 6 | - "result[0].vrfs.default.peerList[0].state eq 'Established'" 7 | retries: 2 8 | interval: 2 9 | loop: "{{topology}}" 10 | when: (item.ebgp_peer_ip is defined) and ((ansible_version['major'] == 2 and ansible_version['minor']|int >= 9)) 11 | ignore_errors: "{{ validation.mode.loose }}" 12 | 13 | - name: validate some ipv4 prefixes are sent to each EBGP neighbor 14 | eos_command: 15 | commands: "show ip bgp neighbors {{item.ebgp_peer_ip}} | json" 16 | waitfor: 17 | - "result[0].vrfs.default.peerList[0].prefixesSent gt '1'" 18 | retries: 2 19 | interval: 2 20 | loop: "{{topology}}" 21 | when: (item.ebgp_peer_ip is defined) and ((ansible_version['major'] == 2 and ansible_version['minor']|int >= 9)) 22 | ignore_errors: "{{ validation.mode.loose }}" 23 | 24 | - name: validate some ipv4 prefixes are received from each EBGP neighbor 25 | eos_command: 26 | commands: "show ip bgp neighbors {{item.ebgp_peer_ip}} | json" 27 | waitfor: 28 | - "result[0].vrfs.default.peerList[0].prefixesReceived gt '1'" 29 | retries: 2 30 | interval: 2 31 | loop: "{{topology}}" 32 | when: (item.ebgp_peer_ip is defined) and ((ansible_version['major'] == 2 and ansible_version['minor']|int >= 9)) 33 | ignore_errors: "{{ validation.mode.loose }}" 34 | 35 | -------------------------------------------------------------------------------- /roles/validate_device_model_and_SW_release/README.md: -------------------------------------------------------------------------------- 1 | - validate the EOS version is the expected one 2 | - validate the HW model is the expected one -------------------------------------------------------------------------------- /roles/validate_device_model_and_SW_release/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: validate EOS version and HW model 3 | eos_command: 4 | commands: "show version | json" 5 | waitfor: 6 | - result[0].modelName eq '{{ model }}' 7 | - result[0].version eq '{{ version }}' 8 | -------------------------------------------------------------------------------- /roles/validate_environment/README.md: -------------------------------------------------------------------------------- 1 | - validate power supplies status 2 | - validate fan status (power supplies) 3 | - validate fan status (fan tray) 4 | - validate temperature -------------------------------------------------------------------------------- /roles/validate_environment/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: collect power supplies status 3 | eos_command: 4 | commands: "show environment power | json" 5 | register: power 6 | 7 | - name: validate power supplies status 8 | assert: 9 | that: 10 | - item.value.state == 'ok' 11 | quiet: true 12 | loop: "{{ power.stdout_lines.0.powerSupplies|dict2items }}" 13 | ignore_errors: "{{ validation.mode.loose }}" 14 | 15 | - name: collect fan status 16 | eos_command: 17 | commands: "show environment cooling | json" 18 | register: fan 19 | 20 | - name: validate fan status (power supplies) 21 | assert: 22 | that: 23 | - item.status == 'ok' 24 | quiet: true 25 | loop: "{{ fan.stdout_lines.0.powerSupplySlots }}" 26 | ignore_errors: "{{ validation.mode.loose }}" 27 | 28 | - name: validate fan status (fan tray) 29 | assert: 30 | that: 31 | - item.status == 'ok' 32 | quiet: true 33 | loop: "{{ fan.stdout_lines.0.fanTraySlots }}" 34 | ignore_errors: "{{ validation.mode.loose }}" 35 | 36 | - name: validate temperature 37 | eos_command: 38 | commands: "show environment temperature | json" 39 | wait_for: result[0].systemStatus eq 'temperatureOk' 40 | ignore_errors: "{{ validation.mode.loose }}" 41 | -------------------------------------------------------------------------------- /roles/validate_interfaces_status/README.md: -------------------------------------------------------------------------------- 1 | - validate interfaces admin state (interfaces between devices) 2 | - validate interfaces operational state (interfaces between devices) -------------------------------------------------------------------------------- /roles/validate_interfaces_status/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: validate interfaces admin state (interfaces between devices) 3 | eos_command: 4 | commands: "show interfaces {{item.interface}} description | json" 5 | waitfor: 6 | - result[0].interfaceDescriptions.{{item.interface}}.interfaceStatus eq 'up' 7 | retries: 2 8 | interval: 2 9 | loop: "{{topology}}" 10 | when: (item.interface is defined) and ((ansible_version['major'] == 2 and ansible_version['minor']|int >= 9)) 11 | ignore_errors: "{{ validation.mode.loose }}" 12 | 13 | - name: validate interfaces operational state (interfaces between devices) 14 | eos_command: 15 | commands: "show interfaces {{item.interface}} description | json" 16 | waitfor: 17 | - result[0].interfaceDescriptions.{{item.interface}}.lineProtocolStatus eq 'up' 18 | retries: 2 19 | interval: 2 20 | loop: "{{topology}}" 21 | when: (item.interface is defined) and ((ansible_version['major'] == 2 and ansible_version['minor']|int >= 9)) 22 | ignore_errors: "{{ validation.mode.loose }}" 23 | -------------------------------------------------------------------------------- /roles/validate_ip_reachability/README.md: -------------------------------------------------------------------------------- 1 | Runs PING from EOS devices to validate IP reachability: 2 | - from local interface to EBGP peers (directly connected) 3 | - from local interface to EBGP peers loopback 4 | - from local loopback to EBGP peers loopback 5 | -------------------------------------------------------------------------------- /roles/validate_ip_reachability/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: validate IP reachability with EBGP peers (directly connected) 2 | eos_command: 3 | commands: "ping {{ item.ebgp_peer_ip }} source {{ item.ip }} repeat 1 " 4 | waitfor: result[0] contains '1 received' 5 | loop: "{{topology}}" 6 | ignore_errors: "{{ validation.mode.loose }}" 7 | when: (item.ebgp_peer_ip is defined) and (item.ip is defined) 8 | 9 | # - name: run icmp ping on remote EOS devices (to EBGP peers) 10 | # eos_command: 11 | # commands: "ping {{ item.ebgp_peer_ip }} source {{ item.ip }} repeat 1 " 12 | # register: registered_icmp_ebgp 13 | # loop: "{{topology}}" 14 | 15 | # - name: check packet lost (ping EBGP peers) 16 | # assert: 17 | # that: 18 | # - "'1 received' in item.stdout.0" 19 | # quiet: true 20 | # loop: "{{ registered_icmp_ebgp.results }}" 21 | # ignore_errors: "{{ validation.mode.loose }}" 22 | 23 | - name: validate IP reachability from a local interface to EBGP peers loopback 24 | eos_command: 25 | commands: "ping {{ item.ebgp_peer_loopback }} source {{ item.ip }} repeat 1 " 26 | waitfor: result[0] contains '1 received' 27 | loop: "{{topology}}" 28 | ignore_errors: "{{ validation.mode.loose }}" 29 | when: (item.ebgp_peer_loopback is defined) and (item.ip is defined) 30 | 31 | - name: validate IP reachability from local loopback to EBGP peers loopback 32 | eos_command: 33 | commands: "ping {{ item.ebgp_peer_loopback }} source {{ loopback }} repeat 1 " 34 | waitfor: result[0] contains '1 received' 35 | loop: "{{topology}}" 36 | ignore_errors: "{{ validation.mode.loose }}" 37 | when: (item.ebgp_peer_loopback is defined) 38 | 39 | -------------------------------------------------------------------------------- /roles/validate_lldp_neighbors/README.md: -------------------------------------------------------------------------------- 1 | validate LLDP topology: collects LLDP informartions for each interface, and compares the expected neighbor and the expected neigbor interface with the actual neighbor and the actual neighbor interface. -------------------------------------------------------------------------------- /roles/validate_lldp_neighbors/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: validate LLDP topology 3 | eos_command: 4 | commands: "show lldp neighbors {{item.interface}} | json" 5 | waitfor: 6 | - "result[0].lldpNeighbors[0].neighborDevice eq {{item.lldp_neighbor}}.{{domain_name}}" 7 | - "result[0].lldpNeighbors[0].neighborPort eq {{item.lldp_neighbor_interface}}" 8 | retries: 2 9 | interval: 2 10 | loop: "{{topology}}" 11 | when: (item.interface is defined) and (item.lldp_neighbor is defined) and ((ansible_version['major'] == 2 and ansible_version['minor']|int >= 9)) 12 | ignore_errors: "{{ validation.mode.loose }}" 13 | -------------------------------------------------------------------------------- /roles/validate_routing_table/README.md: -------------------------------------------------------------------------------- 1 | For the loopback address of each EBGP neighbor, validate in the routing table both the `via nexthop` and the `via interface`. 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /roles/validate_routing_table/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: validate the routing table (both the via nexthop and the via interface) for the loopback address of each EBGP neighbor 3 | eos_command: 4 | commands: "show ip route {{ item.ebgp_peer_loopback + ('/32') }} | json" 5 | waitfor: 6 | - result[0][vrfs][default][routes][{{ item.ebgp_peer_loopback + ('/32') }}][vias][0][nexthopAddr] eq {{item.ebgp_peer_ip}} 7 | - result[0]['vrfs']['default']['routes']['{{ item.ebgp_peer_loopback + ("/32") }}']['vias'][0]['interface'] eq {{item.interface}} 8 | retries: 2 9 | interval: 2 10 | loop: "{{topology}}" 11 | when: (item.ebgp_peer_loopback is defined) and ((ansible_version['major'] == 2 and ansible_version['minor']|int >= 9)) 12 | ignore_errors: "{{ validation.mode.loose }}" 13 | -------------------------------------------------------------------------------- /templates/audit_report.j2: -------------------------------------------------------------------------------- 1 | # Report for device {{ inventory_hostname }}.{{ domain_name }} 2 | 3 | ## Device details ({{ inventory_hostname }}) 4 | 5 | ### HW model 6 | {# The expected hw model is defined in yaml #} 7 | {# The actual hw model should be equal to the expected model #} 8 | 9 | {% set hw_model = registered_version.stdout_lines.0.modelName %} 10 | {% if (hw_model == model) %} 11 | {% set result = 'PASS' %} 12 | {% else %} 13 | {% set result = 'FAIL' %} 14 | {% endif %} 15 | 16 | | Expected model | Actual model | Result | 17 | | :-----: | :-----: | :-----: | 18 | | {{ model }} | {{ hw_model }} | {{ result | default('FAIL') }} | 19 | 20 | ### SW version 21 | {# The expected EOS version is defined in yaml #} 22 | {# The actual EOS version should be equal to the expected EOS version #} 23 | 24 | {% set eos_version = registered_version.stdout_lines.0.version %} 25 | {% if (eos_version == version) %} 26 | {% set result = 'PASS' %} 27 | {% else %} 28 | {% set result = 'FAIL' %} 29 | {% endif %} 30 | 31 | 32 | | Expected version | Actual version | Result | 33 | | :-----: | :-----: | :-----: | 34 | | {{ version }} | {{ eos_version }} | {{ result | default('FAIL') }} | 35 | 36 | ## Environment ({{ inventory_hostname }}) 37 | 38 | ### Power 39 | 40 | | Power Supply | State | Result | 41 | | :-----: | :-----: | :-----: | 42 | {%- for key, value in registered_power.stdout_lines.0.powerSupplies.items() %} 43 | {% set ps = key %} 44 | {% set ps_state = value.state %} 45 | {% if ps_state == 'ok' %} 46 | {% set result = 'PASS' %} 47 | {% else %} 48 | {% set result = 'FAIL' %} 49 | {% endif %} 50 | | {{ ps }} | {{ ps_state }} | {{ result | default('FAIL')}} | 51 | {%- endfor %} 52 | 53 | ### Temperature 54 | 55 | {% set temperature_status = registered_temperature.stdout_lines.0.systemStatus %} 56 | {% if (temperature_status == 'temperatureOk') %} 57 | {% set result = 'PASS' %} 58 | {% else %} 59 | {% set result = 'FAIL' %} 60 | {% endif %} 61 | 62 | | System temperature status| Result | 63 | | :-----: | :-----: | 64 | | {{ temperature_status }} | {{ result | default('FAIL') }} | 65 | 66 | ### Cooling 67 | 68 | #### Power supplies 69 | 70 | | Power Supply | Fans status | Result | 71 | | :-----: | :-----: | :-----: | 72 | 73 | {%- for item in registered_fan.stdout_lines.0.powerSupplySlots %} 74 | {% set ps_tmp_status = item.status %} 75 | {% set ps = item.label %} 76 | {% if ps_tmp_status == 'ok' %} 77 | {% set result = 'PASS' %} 78 | {% else %} 79 | {% set result = 'FAIL' %} 80 | {% endif %} 81 | | {{ ps }} | {{ ps_tmp_status }} | {{ result | default('FAIL')}} | 82 | {%- endfor %} 83 | 84 | #### Fan trays 85 | 86 | | Fan tray | Fans status | Result | 87 | | :-----: | :-----: | :-----: | 88 | 89 | {%- for item in registered_fan.stdout_lines.0.fanTraySlots %} 90 | {% set fan_tray_tmp_status = item.status %} 91 | {% set fan_tray = item.label %} 92 | {% if fan_tray_tmp_status == 'ok' %} 93 | {% set result = 'PASS' %} 94 | {% else %} 95 | {% set result = 'FAIL' %} 96 | {% endif %} 97 | | {{ fan_tray }} | {{ fan_tray_tmp_status }} | {{ result | default('FAIL')}} | 98 | {%- endfor %} 99 | 100 | 101 | ## Interfaces admin and operationnal status ({{ inventory_hostname }}) 102 | 103 | ### interfaces connected to other devices 104 | 105 | {# Interfaces between devices are described in YAML files. Their actual state should be up/up #} 106 | | Interface | Admin status | Operationnal Status | Result | 107 | | :-----: | :-----: | :-----: | :-----: | 108 | {%- for item in registered_interfaces.results %} 109 | {% set interface = item.item.interface %} 110 | {% set admin_status = item.stdout.0.interfaceDescriptions[item.item.interface].interfaceStatus %} 111 | {% set op_status = item.stdout.0.interfaceDescriptions[item.item.interface].lineProtocolStatus %} 112 | {% if (admin_status |upper == 'UP') and (op_status |upper == 'UP') %} 113 | {% set result = 'PASS' %} 114 | {% else %} 115 | {% set result = 'FAIL' %} 116 | {% endif %} 117 | | {{ interface }} | {{ admin_status }} | {{ op_status }} | {{ result | default('FAIL') }} 118 | {%- endfor %} 119 | 120 | ## LLDP topology ({{ inventory_hostname }}) 121 | {# The topology is described in YAML files. The collected lldp details should match the topology described #} 122 | | Interface | Expected neighbor | Actual neighbor | Expected neighbor interface | Actual neighbor interface | Result | 123 | | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: | 124 | {%- for item in registered_lldp.results %} 125 | {% set interface = item.item.interface %} 126 | {% set actual_neighbor = item.stdout.0.lldpNeighbors[0].neighborDevice %} 127 | {% set expected_neighbor = item.item.lldp_neighbor + '.' + hostvars[item.item.lldp_neighbor]['domain_name'] %} 128 | {% set expected_neighbor_interface = item.item.lldp_neighbor_interface %} 129 | {% set actual_neighbor_interface = item.stdout.0.lldpNeighbors[0].neighborPort %} 130 | {% if (actual_neighbor |upper == expected_neighbor |upper) and (actual_neighbor_interface == expected_neighbor_interface) %} 131 | {% set result = 'PASS' %} 132 | {% else %} 133 | {% set result = 'FAIL' %} 134 | {% endif %} 135 | | {{ interface }} | {{ expected_neighbor }} | {{ actual_neighbor }} | {{ expected_neighbor_interface }} | {{ actual_neighbor_interface }} | {{ result | default('FAIL')}} | 136 | {%- endfor %} 137 | 138 | ## BGP ({{ inventory_hostname }}) 139 | 140 | ### EBGP sessions state 141 | {# EBGP neighbors described in YAML files. BGP sessions should be established #} 142 | | EBGP Peer | Session state | Result | 143 | | :-----: | :-----: | :-----: | 144 | {%- for item in registered_bgp.results %} 145 | {% set peer = item.item.ebgp_peer_ip %} 146 | {% set state = item.stdout.0.vrfs.default.peerList[0].state %} 147 | {% if state |upper == 'ESTABLISHED' %} 148 | {% set result = 'PASS' %} 149 | {% else %} 150 | {% set result = 'FAIL' %} 151 | {% endif %} 152 | | {{ peer }} | {{ state }} | {{ result | default('FAIL')}} | 153 | {%- endfor %} 154 | 155 | ### IPv4 prefixes sent to EBGP peer 156 | 157 | {# EBGP neighbors described in YAML files #} 158 | {# Some IPv4 prefixes should be sent to each EBGP neighbors #} 159 | 160 | | EBGP Peer | IPv4 Prefixes sent | Result | 161 | | :-----: | :-----: | :-----: | 162 | {%- for item in registered_bgp.results %} 163 | {% set peer = item.item.ebgp_peer_ip %} 164 | {% set prefixes_sent = item.stdout.0.vrfs.default.peerList[0].prefixesSent %} 165 | {% if (prefixes_sent >= 1) %} 166 | {% set result = 'PASS' %} 167 | {% else %} 168 | {% set result = 'FAIL' %} 169 | {% endif %} 170 | | {{ peer }} | {{ prefixes_sent }} | {{ result | default('FAIL')}} | 171 | {%- endfor %} 172 | 173 | ### IPv4 prefixes received from EBGP peer 174 | 175 | {# EBGP neighbors described in YAML files #} 176 | {# Some IPv4 prefixes should be received from each BGP neighbors #} 177 | 178 | | EBGP Peer | IPv4 Prefixes received | Result | 179 | | :-----: | :-----: | :-----: | 180 | {%- for item in registered_bgp.results %} 181 | {% set peer = item.item.ebgp_peer_ip %} 182 | {% set prefixes_received = item.stdout.0.vrfs.default.peerList[0].prefixesReceived %} 183 | {% if (prefixes_received >= 1) %} 184 | {% set result = 'PASS' %} 185 | {% else %} 186 | {% set result = 'FAIL' %} 187 | {% endif %} 188 | | {{ peer }} | {{ prefixes_received }} | {{ result | default('FAIL')}} 189 | {%- endfor %} 190 | 191 | ## Routing table ({{ inventory_hostname }}) 192 | 193 | {# loopback address of each EBGP neighbor is defined in YAML #} 194 | {# Validate the routing table (including the "via nexthop" and the "via interface") for this address #} 195 | | Destination (EBGP peer loopback) | via next hop | via interface | Result | 196 | | :-----: | :-----: | :-----: | :-----: | 197 | {%- for item in registered_routing.results %} 198 | {% set address = item.item.ebgp_peer_loopback + ('/32') %} 199 | {% set via_interface = item['stdout'][0]['vrfs']['default']['routes'][address]['vias'][0]['interface'] %} 200 | {% set via_next_hop = item['stdout'][0]['vrfs']['default']['routes'][address]['vias'][0]['nexthopAddr'] %} 201 | {% if (via_interface |upper == item.item.interface |upper) and (via_next_hop == item.item.ebgp_peer_ip) %} 202 | {% set result = 'PASS' %} 203 | {% else %} 204 | {% set result = 'FAIL' %} 205 | {% endif %} 206 | | {{ address }} | {{ via_next_hop }} | {{ via_interface }} | {{ result | default('FAIL')}} | 207 | {%- endfor %} 208 | 209 | ## IP reachability ({{ inventory_hostname }}) 210 | 211 | ### Ping EBGP peers from {{ inventory_hostname }} interfaces 212 | {# EBGP neighbors described in YAML files #} 213 | {# The devices should be able to ping their EBGP neighbors #} 214 | 215 | | source interface | IP source | IP destination (EBGP peer) | Result | 216 | | :-----: | :-----: | :-----: | :-----: | 217 | 218 | {%- for item in registered_icmp_ebgp.results %} 219 | {% set source = item.item.ip %} 220 | {% set destination = item.item.ebgp_peer_ip %} 221 | {% set interface = item.item.interface %} 222 | {% if "1 received" in item.stdout.0 %} 223 | {% set result = 'PASS' %} 224 | {% else %} 225 | {% set result = 'FAIL' %} 226 | {% endif %} 227 | | {{ interface }} | {{ source }} | {{ destination }} | {{ result | default('FAIL')}} | 228 | {%- endfor %} 229 | 230 | ### Ping EBGP peers loopback from {{ inventory_hostname }} interfaces 231 | {# loopback address of each EBGP neighbor is defined in YAML #} 232 | {# The devices should be able to ping their EBGP neighbors #} 233 | 234 | | source interface | IP source | IP destination (EBGP peer loopback) | Result | 235 | | :-----: | :-----: | :-----: | :-----: | 236 | {%- for item in registered_icmp_from_loopback_to_ebgp_loopback.results %} 237 | {% set source = item.item.ip %} 238 | {% set destination = item.item.ebgp_peer_loopback %} 239 | {% set interface = item.item.interface %} 240 | {% if "1 received" in item.stdout.0 %} 241 | {% set result = 'PASS' %} 242 | {% else %} 243 | {% set result = 'FAIL' %} 244 | {% endif %} 245 | | {{ interface }} | {{ source }} | {{ destination }} | {{ result | default('FAIL')}} | 246 | {%- endfor %} 247 | 248 | ### Ping EBGP peers loopback from {{ inventory_hostname }} loopback 249 | {# loopback address of each EBGP neighbor is defined in YAML. The devices should be able to ping their EBGP neighbors #} 250 | | IP source | IP destination (EBGP peer loopback) | Result | 251 | | :-----: | :-----: | :-----: | 252 | {%- for item in registered_icmp_from_loopback_to_ebgp_loopback.results %} 253 | {% set source = hostvars[inventory_hostname]['loopback'] %} 254 | {% set destination = item.item.ebgp_peer_loopback %} 255 | {% if "1 received" in item.stdout.0 %} 256 | {% set result = 'PASS' %} 257 | {% else %} 258 | {% set result = 'FAIL' %} 259 | {% endif %} 260 | | {{ source }} | {{ destination }} | {{ result | default('FAIL')}} | 261 | {%- endfor %} 262 | -------------------------------------------------------------------------------- /templates/audit_report_structure.j2: -------------------------------------------------------------------------------- 1 | # Audit report structure 2 | {% for item in groups.eos %} 3 | [Report for device {{ item }}.{{ domain_name }}](#report-for-device-{{ item| lower }}{{ domain_name| lower |replace(".", "")}}) 4 | {% endfor %} -------------------------------------------------------------------------------- /templates/config.j2: -------------------------------------------------------------------------------- 1 | hostname {{ inventory_hostname }} 2 | ip domain-name {{ domain_name }} 3 | {% for item in topology %} 4 | interface {{ item.interface }} 5 | no shutdown 6 | description "{{ item.lldp_neighbor}} **** {{ item.lldp_neighbor_interface }}" 7 | no switchport 8 | ip address {{ item. ip }}/{{ item.subnet }} 9 | {% endfor %} 10 | interface Loopback0 11 | ip address {{ loopback }}/32 12 | router bgp {{ as }} 13 | redistribute connected 14 | {% for item in topology %} 15 | neighbor {{ item.ebgp_peer_ip }} remote-as {{ hostvars[item.lldp_neighbor]['as'] }} 16 | {% endfor %} -------------------------------------------------------------------------------- /topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arista-netdevops-community/arista_eos_automation_with_ansible/e6b878165edd4e4d9729bd2dd3e5943d0b6031e6/topology.png --------------------------------------------------------------------------------