junos_install_os - Install a Junos OS image.

Author:Jeremy Schulman, Juniper Networks

Synopsis

New in version 1.0.0.

Install a Junos OS image on one or more Routing Engines. This module supports installations on single Routing Engine devices, MX Series routers with dual Routing Engines, and EX Series switches in a non-mixed Virtual Chassis. This action is equivalent to performing the Junos OS request system software add operational command. If the existing Junos OS version matches the desired version, no action is performed, and the “changed” attribute reports False. If the existing version does not match, then the module performs the following actions (1) Computes the MD5 checksum of the package located on the server. (2) Copies the Junos OS software package to the device running Junos OS. (3) Computes the MD5 checksum on the device running Junos OS and compares the two. (4) Installs the Junos OS software package. (5) Reboots the device (default). Running the module in check mode reports whether the current Junos OS version matches the desired version.

Options

parameter required default choices comments
host yes
    Set to {{ inventory_hostname }}
    issu no
    • true
    • false
    • yes
    • no
    If set to true, allows unified in-service software upgrade (ISSU) feature enables you to upgrade between two different Junos OS releases with no disruption on the control plane and with minimal disruption of traffic.
    logfile no None
      Path on the local server where the progress status is logged for debugging purposes
      no_copy no
      • true
      • false
      Installer need to be copied or not on the device.
      nssu no
      • true
      • false
      • yes
      • no
      If set to true, allows nonstop software upgrade (NSSU) enables you to upgrade the software running on a Juniper Networks EX Series Virtual Chassis or a Juniper Networks EX Series Ethernet Switch with redundant Routing Engines with a single command and minimal disruption to network traffic.
      package yes
        Absolute path on the local server to the Junos OS software package
        passwd no assumes ssh-key active
          Login password
          port no 830
            port number to use when connecting to the device
            reboot no True
            • true
            • false
            • yes
            • no
            If set to yes, the device reboots after the installation completes.
            reboot_pause no 10
              Amount of time in seconds to wait after the reboot is issued
              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
                  version yes
                    Junos OS version string as it would be reported by the show version command

                    Note

                    Requires py-junos-eznc >= 1.2.2

                    Examples


                    - junos_install_os:
                        host={{ inventory_hostname }}
                        version=12.1X46-D10.2
                        package=/usr/local/junos/images/junos-vsrx-12.1X46-D10.2-domestic.tgz
                        logfile=/usr/local/junos/log/software.log