.. _junos_cli: junos_cli - Execute CLI on device and save the output locally +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ :Author: Damien Garros, Juniper Networks .. contents:: :local: :depth: 1 Synopsis -------- .. versionadded:: 1.2.0 Execute CLI on device and save the output locally on a file Options ------- .. raw:: html
parameter required default choices comments
cli yes
    CLI command to execute on the host
    dest yes None
      Path to the local server directory where cli output will be saved.
      format no text
      • text
      • xml
      text - Cli output saved in text formatxml - Cli output saved as XML
      host yes
        Set to {{ inventory_hostname }}
        logfile no None
          Path on the local server where the progress status is logged for debugging purposes
          passwd no assumes ssh-key active
            Login password
            port no 830
              TCP port number to use when connecting to the device
              user no $USER
                Login username
                .. note:: Requires junos-eznc >= 1.2.2 Examples -------- .. raw:: html
                :: - junos_cli: host: "{{ inventory_hostname }}" cli: "show chassis hardware" logfile: cli.log dest: "{{ inventory_hostname }}.xml" format: xml