-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
demo: add cisco ucs and meraki api (#15)
More info: This commit adds the files necessary for the data collection from Cisco UCS switches. Additionally, it makes this Ansible module compatible with Ansible 2.6.0. Resolves: #12, #13, #14
- Loading branch information
Showing
19 changed files
with
467 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Cisco DevNet Sandbox - Meraki API | ||
|
||
This demo shows how to collect data from [Meraki API](https://learninglabs.cisco.com/modules/dnc-2017-meraki/meraki-dashboard-api/step/1). | ||
|
||
## Data Collection | ||
|
||
A user collects data by browsing to this directory and invoking a specific | ||
playbook. | ||
|
||
``` | ||
cd devnet-meraki/ | ||
ansible-playbook playbooks/collect_all.yml -v | ||
``` | ||
|
||
Once the toolkit collected the data, the user may use `ndmtk-git` to check | ||
that data into source code repository. |
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,8 @@ | ||
[defaults] | ||
inventory = ./hosts | ||
forks = 100 | ||
local_tmp = $HOME/.ansible/tmp | ||
retry_files_enabled = True | ||
retry_files_save_path = $HOME/.ansible/retries/ | ||
log_path = $HOME/.ansible/ansible.log | ||
transport = local |
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 @@ | ||
cisco |
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,22 @@ | ||
$ANSIBLE_VAULT;1.1;AES256 | ||
65333536326365313533313235376363323463373239633463353036383066383631613066353731 | ||
6639663963363938623235356435383231393361333031630a326166633439373734366364376336 | ||
36316233353662653663666636666536353838323535363339613864323764353564396535303231 | ||
6239383364656335640a383532303531313337346363366538616438333434353862633565363330 | ||
38383665626131376561393435646235383962623061643430383165656461346166653939656239 | ||
32366662366631373662373630383930653233363465643335343139633566376562643338643133 | ||
32653538336433363732313537663631356332333362613835323065353262663334626439643436 | ||
30303663356435386537656162303734666165363735336433373931376431366461373739393664 | ||
37383564366232343661393864313731353233353162346666653261343762616533363933653338 | ||
32633239316163643332643462323632656331383730656230366233346265353733356663613065 | ||
62373064353436323262633966373736356566353561636136316164363333633830303464656337 | ||
34613939353935656462303862356638353033326139333762376665363335613931653939383832 | ||
30363465346539343033666334323730633237643737323231323138343464363963393663386266 | ||
36646239376537356534616435653438333336633633386565643265376565653139353530336562 | ||
33393130336534613537353963623963333466656466336464343362626131323561343333616537 | ||
65616232313634613430616263306333666632623132656435383566373630356135303561656364 | ||
62333762643463653865313938396331653261613439623738613239383462643961316464353239 | ||
39396566383962346338343330393239363231396162313837333563303036343330313164313736 | ||
31333163303066336162373336356464326566323166653035333762333139636434663632373834 | ||
63616132643362376632633763333436383433353662366664396531393331303064623830366461 | ||
3937 |
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,14 @@ | ||
# | ||
# DevNet Sandbox | ||
# | ||
|
||
controller ansible_connection=local | ||
|
||
[cisco-ucs:children] | ||
cisco-ucs-shell | ||
|
||
[cisco-ucs-shell] | ||
cisco-ucs-manager os=cisco_ucs host_overwrite=10.199.0.219 host_port=5901 | ||
|
||
[cisco-ucs:vars] | ||
ansible_connection=local |
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,14 @@ | ||
--- | ||
- name: data collection from Cisco UCS | ||
hosts: | ||
- 'cisco-ucs' | ||
strategy: free | ||
gather_facts: no | ||
tasks: | ||
- name: collect all available data from Cisco UCS Manager managed fabric | ||
action: ndmtk | ||
output="/opt/data/devnet-cisco-ucs/cisco-ucs-%Y%m%d%H%M%S" | ||
no_host_key_check=yes | ||
on_error=continue | ||
safe="./ansible.vault.yml" | ||
lockpick="./ansible.vault.key" |
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,16 @@ | ||
# Cisco DevNet Sandbox - Meraki API | ||
|
||
This demo shows how to collect data from [Meraki API](https://learninglabs.cisco.com/modules/dnc-2017-meraki/meraki-dashboard-api/step/1). | ||
|
||
## Data Collection | ||
|
||
A user collects data by browsing to this directory and invoking a specific | ||
playbook. | ||
|
||
``` | ||
cd devnet-meraki/ | ||
ansible-playbook playbooks/collect_all.yml -v | ||
``` | ||
|
||
Once the toolkit collected the data, the user may use `ndmtk-git` to check | ||
that data into source code repository. |
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,8 @@ | ||
[defaults] | ||
inventory = ./hosts | ||
forks = 100 | ||
local_tmp = $HOME/.ansible/tmp | ||
retry_files_enabled = True | ||
retry_files_save_path = $HOME/.ansible/retries/ | ||
log_path = $HOME/.ansible/ansible.log | ||
transport = local |
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 @@ | ||
cisco |
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,22 @@ | ||
$ANSIBLE_VAULT;1.1;AES256 | ||
63393532663966663530643432313839343231303836653661303335303434316535626238646135 | ||
3438333662353363363439353838643736636263343763640a623730316639646535366262373731 | ||
34333666626639396663383464613762303135366539356438373130363033353931386631306333 | ||
3566303664393632390a353637653363303865626237663339653833363662303761633363643262 | ||
32303537373061356130653461303865386338663233313137396238663537323831336264636338 | ||
37386539646563623162303530313131633833623937613033356363653966396265626366393033 | ||
62373233376336616438386338323238636236343435346463643535366135386332336630313736 | ||
33303466346531303366363537346331376265363462646462316538343538336163363335306331 | ||
64666230613665653866356365323533633033336565663831636562613534396532316265323730 | ||
34343661636365323838633366303439393736343264366334346535313361633330326338383838 | ||
37333834306135656135396461316134353830653036313162306631383065393438396561646331 | ||
39613162653966393537393636373166393236656331636538623231623662363131623362393339 | ||
62396638313966633935323663633137623639353631653434353836353633333135396431373538 | ||
31346465656636363530353339386534343736663833353831316161323663653535666163306436 | ||
32323832326235663362313534633530613939326439626234643733623038323364326166396535 | ||
32323333323339646133343764336632313334666534643333323039653636383563363534666131 | ||
35326134393039336633373966353032313230336364373430306536316135383132653535356466 | ||
33633235646238376430653463346639363331643336356565383862346362303563383532653130 | ||
34323936663031313862653535326366326236616136623165663837366639366437643263633433 | ||
62333064386633613132376365613665363935646434653630326161346565666563646338616531 | ||
65333965386664333939623335386432643964316265613162313536643361333262 |
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,14 @@ | ||
# | ||
# DevNet Sandbox | ||
# | ||
|
||
controller ansible_connection=local | ||
|
||
[meraki:children] | ||
meraki-api | ||
|
||
[meraki-api] | ||
meraki-endpoint os=rest api_endpoint="https://dashboard.meraki.com/api/v0" | ||
|
||
[meraki:vars] | ||
ansible_connection=local |
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,14 @@ | ||
--- | ||
- name: data collection from Meraki API | ||
hosts: | ||
- meraki | ||
strategy: free | ||
gather_facts: no | ||
tasks: | ||
- name: collect all available data from Meraki API nodes | ||
action: ndmtk | ||
output="/opt/data/devnet-meraki/meraki-%Y%m%d%H%M%S" | ||
no_host_key_check=yes | ||
on_error=continue | ||
safe="./ansible.vault.yml" | ||
lockpick="./ansible.vault.key" |
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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
--- | ||
- name: OSPF configuration | ||
hosts: | ||
#- sandbox | ||
- nx-osv-2 | ||
- sandbox | ||
strategy: free | ||
gather_facts: no | ||
tasks: | ||
|
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,201 @@ | ||
--- | ||
# | ||
# ndmtk - Network Discovery and Management Toolkit | ||
# Copyright (C) 2016 Paul Greenberg @greenpau | ||
# See LICENSE.txt for licensing details | ||
# | ||
# File: plugins/action/files/cli/os/cisco_ucs.yml | ||
# | ||
|
||
ndmtk: | ||
- cli: 'show configuration all' | ||
tags: 'configuration' | ||
paging: 'terminal length 0' | ||
- cli: 'show version' | ||
tags: 'version' | ||
- description: 'Collect UCS Chassis information' | ||
cli: 'show chassis detail' | ||
tags: ['version'] | ||
- description: 'Collect firmware information' | ||
cli: 'show chassis firmware detail' | ||
tags: ['management'] | ||
- description: 'Collect version information' | ||
cli: 'show chassis version detail' | ||
tags: ['management'] | ||
- description: 'Collect fabric information' | ||
cli: 'show chassis fabric detail' | ||
tags: ['management'] | ||
- description: 'Collect chassis health information' | ||
cli: 'show chassis environment detail' | ||
tags: ['management'] | ||
- description: 'Collect chassis health information (IO Module)' | ||
cli: 'show chassis environment iom detail' | ||
tags: ['management'] | ||
- description: 'Collect chassis health information (Power Supplies)' | ||
cli: 'show chassis environment psu detail' | ||
tags: ['management'] | ||
- description: 'Collect chassis health information (Fans)' | ||
cli: 'show chassis environment fan detail' | ||
tags: ['management'] | ||
- description: 'Collect chassis health information (Servers)' | ||
cli: 'show chassis environment server detail' | ||
tags: ['management'] | ||
- description: 'Collect chassis inventory information' | ||
cli: 'show chassis inventory detail' | ||
tags: ['inventory'] | ||
- description: 'Collect chassis inventory information (IO Module)' | ||
cli: 'show chassis inventory iom detail' | ||
tags: ['inventory'] | ||
- description: 'Collect chassis inventory information (Power Supplies)' | ||
cli: 'show chassis inventory psu detail' | ||
tags: ['inventory'] | ||
- description: 'Collect chassis inventory information (Fans)' | ||
cli: 'show chassis inventory fan detail' | ||
tags: ['inventory'] | ||
- description: 'Collect chassis inventory information (Servers)' | ||
cli: 'show chassis inventory server detail' | ||
tags: ['inventory'] | ||
- cli: 'show clock detail' | ||
tags: ['clock'] | ||
- cli: 'show cluster state' | ||
tags: ['high_availability'] | ||
- cli: 'show cluster extended-state' | ||
tags: ['high_availability'] | ||
- cli: 'show eth-uplink detail' | ||
tags: ['network'] | ||
- cli: 'show eth-uplink detail expand' | ||
tags: ['network'] | ||
- cli: 'show fabric-interconnect detail' | ||
tags: ['network'] | ||
- cli: 'show fabric-interconnect environment expand detail' | ||
tags: ['network'] | ||
- cli: 'show fabric-interconnect inventory expand detail' | ||
tags: ['network'] | ||
- cli: 'show fabric-interconnect mode' | ||
tags: ['network'] | ||
- cli: 'show fabric-interconnect mac-aging' | ||
tags: ['network'] | ||
- cli: 'show fabric-interconnect version' | ||
tags: ['network'] | ||
- cli: 'show fabric-interconnect firmware' | ||
tags: ['network'] | ||
- cli: 'show fault' | ||
tags: ['management'] | ||
- cli: 'show security detail' | ||
tags: ['servers'] | ||
- cli: 'show server inventory expand detail' | ||
tags: ['servers'] | ||
- cli: 'show server assoc' | ||
tags: ['servers'] | ||
- cli: 'show server boot-order detail' | ||
tags: ['servers'] | ||
- cli: 'show server firmware detail' | ||
tags: ['servers'] | ||
- cli: 'show server identity' | ||
tags: ['servers'] | ||
- cli: 'show server status' | ||
tags: ['servers'] | ||
- cli: 'show server status detail' | ||
tags: ['servers'] | ||
- cli: 'show server storage detail' | ||
tags: ['servers'] | ||
- cli: 'show server version detail' | ||
tags: ['servers'] | ||
- cli: 'show service-profile assoc' | ||
tags: ['sevice_profile'] | ||
- cli: 'show service-profile assoc detail' | ||
tags: ['sevice_profile'] | ||
- cli: 'show service-profile circuit' | ||
tags: ['sevice_profile'] | ||
- cli: 'show service-profile circuit detail' | ||
tags: ['sevice_profile'] | ||
- cli: 'show service-profile connectivity' | ||
tags: ['sevice_profile'] | ||
- cli: 'show service-profile connectivity detail' | ||
tags: ['sevice_profile'] | ||
- cli: 'show service-profile identity' | ||
tags: ['sevice_profile'] | ||
- cli: 'show service-profile inventory' | ||
tags: ['sevice_profile'] | ||
- cli: 'show service-profile inventory expand detail' | ||
tags: ['sevice_profile'] | ||
- cli: 'show service-profile path' | ||
tags: ['sevice_profile'] | ||
- cli: 'show service-profile path detail' | ||
tags: ['sevice_profile'] | ||
- cli: 'show service-profile status' | ||
tags: ['sevice_profile'] | ||
- cli: 'show service-profile status expand detail' | ||
tags: ['sevice_profile'] | ||
- description: 'Collect configuration from Fabric Interconnect A' | ||
pre: 'connect nxos a' | ||
cli: 'show running-config' | ||
saveas: '%h.connect.nxos.a.show.running-config.txt' | ||
post: 'exit' | ||
tags: ['network'] | ||
- description: 'Collect version from Fabric Interconnect A' | ||
pre: 'connect nxos a' | ||
cli: 'show version' | ||
saveas: '%h.connect.nxos.a.show.version.txt' | ||
post: 'exit' | ||
tags: ['network'] | ||
- description: 'Collect interface information from Fabric Interconnect A' | ||
pre: 'connect nxos a' | ||
cli: 'show interface' | ||
saveas: '%h.connect.nxos.a.show.interface.txt' | ||
post: 'exit' | ||
tags: ['network'] | ||
- description: 'Collect interface SNMP index information from Fabric Interconnect A' | ||
pre: 'connect nxos a' | ||
cli: 'show interface snmp-ifindex' | ||
saveas: '%h.connect.nxos.a.show.interface.snmp-ifindex.txt' | ||
post: 'exit' | ||
tags: ['network'] | ||
- description: 'Collect MAC address table from Fabric Interconnect A' | ||
pre: 'connect nxos a' | ||
cli: 'show mac address-table' | ||
saveas: '%h.connect.nxos.a.show.mac.address-table.txt' | ||
post: 'exit' | ||
tags: ['network'] | ||
- description: 'Collect VLAN information from Fabric Interconnect A' | ||
pre: 'connect nxos a' | ||
cli: 'show vlan' | ||
saveas: '%h.connect.nxos.a.show.vlan.txt' | ||
post: 'exit' | ||
tags: ['network'] | ||
- description: 'Collect configuration from Fabric Interconnect B' | ||
pre: 'connect nxos b' | ||
cli: 'show running-config' | ||
saveas: '%h.connect.nxos.b.show.running-config.txt' | ||
post: 'exit' | ||
tags: ['network'] | ||
- description: 'Collect version from Fabric Interconnect B' | ||
pre: 'connect nxos b' | ||
cli: 'show version' | ||
saveas: '%h.connect.nxos.b.show.version.txt' | ||
post: 'exit' | ||
tags: ['network'] | ||
- description: 'Collect interface information from Fabric Interconnect B' | ||
pre: 'connect nxos b' | ||
cli: 'show interface' | ||
saveas: '%h.connect.nxos.b.show.interface.txt' | ||
post: 'exit' | ||
tags: ['network'] | ||
- description: 'Collect interface SNMP index information from Fabric Interconnect B' | ||
pre: 'connect nxos b' | ||
cli: 'show interface snmp-ifindex' | ||
saveas: '%h.connect.nxos.b.show.interface.snmp-ifindex.txt' | ||
post: 'exit' | ||
tags: ['network'] | ||
- description: 'Collect MAC address table from Fabric Interconnect B' | ||
pre: 'connect nxos b' | ||
cli: 'show mac address-table' | ||
saveas: '%h.connect.nxos.b.show.mac.address-table.txt' | ||
post: 'exit' | ||
tags: ['network'] | ||
- description: 'Collect VLAN information from Fabric Interconnect B' | ||
pre: 'connect nxos b' | ||
cli: 'show vlan' | ||
saveas: '%h.connect.nxos.b.show.vlan.txt' | ||
post: 'exit' | ||
tags: ['network'] |
Oops, something went wrong.