junos_zeroize - Erase all data, including configuration and log files, on a device running Junos OS.

Author:Jeremy Schulman, Juniper Networks


New in version 1.0.0.

Execute the Junos OS request system zeroize command to remove all configuration information on the Routing Engines and reset all key values on a device running Junos OS. The command removes all data files, including customized configuration and log files, by unlinking the files from their directories. The command also removes all user-created files from the system including all plain-text passwords, secrets, and private keys for SSH, local encryption, local authentication, IPsec, RADIUS, TACACS+, and SNMP. This command reboots the device and sets it to the factory default configuration. After the reboot, you must log in through the console as root in order to access the device.


parameter required default choices comments
console no None
    SERIAL or TERMINAL-SERVER port setting, per use with the netconify utility
    host no
      Set to {{ inventory_hostname }}
      logfile no None
        Path on the local server where the progress status is logged for debugging purposes
        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
              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
                  zeroize yes None
                    Safety mechanism. You MUST set this to 'zeroize'.


                    Requires junos-eznc >= 1.2.2


                    Requires junos-netconify >= 1.0.1, when using the console option


                    - junos_zeroize:
                        host={{ inventory_hostname }}
                    # over console server connection using PyEZ >= 2.0
                    - junos_zeroize:
                        host={{ inventory_hostname }}


                    You MUST either use the host option or the console option to designate how the device is accessed.