Skip to content

Instantly share code, notes, and snippets.

@privateip
Created March 28, 2016 02:44
Show Gist options
  • Save privateip/567c8b32c082b5560085 to your computer and use it in GitHub Desktop.
Save privateip/567c8b32c082b5560085 to your computer and use it in GitHub Desktop.
Simple playbook to run commands on OpenSwitch from Ansible
---
- hosts: ops01
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: 2222
username: netop
password: netop
tasks:
- name: run show commands over cli
ops_command:
commands:
- show version
- show running-config
provider: "{{ cli }}"
connection: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment