-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
283 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[defaults] | ||
inventory = inventory.yml | ||
jinja2_extensions = jinja2.ext.loopcontrols,jinja2.ext.do,jinja2.ext.i18n |
29 changes: 29 additions & 0 deletions
29
demos/clab-build-containerlab-with-ceos/playbooks/check_the_lab.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
- name: Run show commands on all switches and print the output | ||
hosts: [l01,l02,s01,s02] | ||
vars: | ||
ansible_connection: httpapi | ||
ansible_network_os: eos | ||
ansible_user: admin | ||
ansible_password: admin | ||
ansible_become: yes | ||
ansible_become_method: enable | ||
ansible_httpapi_use_ssl: true | ||
ansible_httpapi_validate_certs: false | ||
tasks: | ||
- name: run show commands | ||
arista.eos.eos_command: | ||
commands: | ||
- show ip bgp summary | ||
- show port-channel dense | ||
- show lldp neighbors | ||
register: cli_output | ||
- name: display result | ||
ansible.builtin.debug: | ||
msg: | ||
- "show ip bgp summary" | ||
- "{{ cli_output.stdout_lines[0] }}" | ||
- "show port-channel dense" | ||
- "{{ cli_output.stdout_lines[1] }}" | ||
- "show lldp neighbors" | ||
- "{{ cli_output.stdout_lines[2] }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters