Cisco Modules

54 views
Skip to first unread message

Roger Gomez

unread,
Mar 25, 2016, 9:41:02 PM3/25/16
to Ansible Project
Normally when we use regular plays, we define a group of hosts and all the tasks in the playbook are executed in the list of hosts defined. For the case of the Cisco modules we need an additional host inside each module declaration for the tasks:
---
- hosts:
  - some_host
  gather_facts: no
  tasks:
  - nxos_command:
     username: ansible
     commands:
     - show ip route
     transport: cli
     use_ssl: no
     host: some_host


I would like to understand why we need this extra-declaration of host (I already understand that was written like that :) ) and if there is a way that we can use this modules to behave like any other modules we use in linux where we only need to declare a host once.
Thanks.

Lisa Huang

unread,
Jul 13, 2016, 4:29:36 PM7/13/16
to Ansible Project
My guess it is for nxapi API.
Reply all
Reply to author
Forward
0 new messages