.. _junos_shutdown: junos_shutdown - Shut down or reboot a device running Junos OS. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ :Author: Jeremy Schulman, Juniper Networks .. contents:: :local: :depth: 1 Synopsis -------- .. versionadded:: 1.0.0 Shut down (power off) or reboot a device running Junos OS. This includes all Routing Engines in a Virtual Chassis or a dual Routing Engine system. This is equivalent to executing either the Junos OS **request system power-off** or **request system reboot** operational command. Options ------- .. raw:: html
parameter required default choices comments
at no None
    Specify a time for the reboot (yyyymmddhhmm). Can be used only with reboot=yes.
    host yes
      Set to {{ inventory_hostname }}
      in_min no
        Specify a delay, in minutes, before the shutdown or reboot. If both "at" and "in_min" are specified, "in_min" will be ignored.
        mode no None
          mode of console connection (telnet/serial). If mode is not provided SSH connection is used.
          passwd no assumes ssh-key active
            Login password
            port no 830
              port number to use when connecting to the device
              reboot no
              • yes
              • no
              If set to yes, then the device is rebooted rather than powered off.
              shutdown yes None
                Safety mechanism. You MUST set this to 'shutdown'.
                ssh_private_key_file no None
                  This can be used if you need to provide a private key rather than loading the key into the ssh-key-ring/environment. if your ssh-key requires a password, then you must provide it via **passwd**
                  user no $USER
                    Login username
                    .. note:: Requires junos-eznc >= 1.2.2 Examples -------- .. raw:: html
                    :: - junos_shutdown: host={{ inventory_hostname }} shutdown="shutdown" reboot=yes # over console server connection using PyEZ >= 2.0 - junos_shutdown: host={{ inventory_hostname }} shutdown="shutdown" reboot=yes mode='telnet' port=7016