.. _junos_get_config: junos_get_config - Retrieve configuration of device +++++++++++++++++++++++++++++++++++++++++++++++++++ :Author: Rick Sherman, Juniper Networks .. contents:: :local: :depth: 1 Synopsis -------- .. versionadded:: 1.2.0 Retrieve the configuration of a device running Junos and save it to a file. **Note** unicode chars will be converted to '??' as also done in PyEZ Options ------- .. raw:: html
parameter required default choices comments
dest yes None
    Path to the local server directory where configuration will be saved.
    filter no None
      Defines heircachy of configuration to retrieve. If omitted entire configuration is retrieved. Format is slash notation ex groups/routeinst/routing-instances/ISP-1
      format no text
      • text
      • xml
      text - configuration saved as text (curly-brace) formatxml - configuration 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
          options no None
            Additional options to pass to get_config. Refer to jnpr.junos.rpcmeta.get_config for details.
            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_get_config: host: "{{ inventory_hostname }}" logfile: get_config.log dest: "{{ inventory_hostname }}.xml" format: xml filter: "interfaces" options: {inherit: inherit, groups: groups}