pn_show - Run show commands on nvOS device.

New in version 2.2.

Synopsis

  • Execute show command in the nodes and returns the results read from the device.

Options

parameter required default choices comments
pn_clipassword
no
Provide login password if user is not root.
pn_cliswitch
no
Target switch(es) to run the cli on.
pn_cliusername
no
Provide login username if user is not root.
pn_command
yes
The pn_command takes a CLI show command as value.
pn_options
no
Specify formatting options.
pn_parameters
no
Display output using a specific parameter. Use 'all' to display possible output. List of comma separated parameters.

Examples

- name: run the vlan-show command
  pn_show:
    pn_command: 'vlan-show'
    pn_parameters: id,scope,ports
    pn_options: 'layout vertical'

- name: run the vlag-show command
  pn_show:
    pn_command: 'vlag-show'
    pn_parameters: 'id,name,cluster,mode'
    pn_options: 'no-show-headers'

- name: run the cluster-show command
  pn_show:
    pn_command: 'cluster-show'

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
changed
Indicates whether the CLI caused any change on the target.
always(False) bool
command
The CLI command run on the target node(s).
always str
stderr
The set of error responses from the show command.
on error list
stdout
The set of responses from the show command.
always list

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/pn_show_module.html