ntc_install_os¶
Synopsis¶
Added in version 1.9.2
Set boot options like boot image and kickstart image. Supported platforms include Cisco Nexus switches with NX-API, Cisco IOS switches or routers, Arista switches with eAPI.
Options¶
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| host | yes |
Hostame or IP address of switch. |
||
| kickstart_image_file | no |
Name of the kickstart image file on flash. |
||
| ntc_conf_file | no |
The path to a local NTC configuration file. If omitted, and ntc_host is specified, the system will look for a file given by the path in the environment variable PYNTC_CONF, and then in the users home directory for a file called .ntc.conf. |
||
| ntc_host | no |
The name of a host as specified in an NTC configuration file. |
||
| password | yes |
Password used to login to the target device |
||
| platform | yes |
|
Switch platform |
|
| port | no |
TCP/UDP port to connect to target device. If omitted standard port numbers will be used. 80 for HTTP; 443 for HTTPS; 22 for SSH. |
||
| secret | no |
Enable secret for devices connecting over SSH. |
||
| system_image_file | yes |
Name of the system (or combined) image file on flash. |
||
| transport | no |
|
Transport protocol for API-based devices. |
|
| username | yes |
Username used to login to the target device |
Important
Requires pyntc
Examples¶
- ntc_install_os:
ntc_host: n9k1
system_image_file: n9000-dk9.6.1.2.I3.1.bin
- ntc_install_os:
ntc_host: n3k1
system_image_file: n3000-uk9.6.0.2.U6.5.bin
kickstart_image_file: n3000-uk9-kickstart.6.0.2.U6.5.bin
- ntc_install_os:
ntc_host: c2801
system_image_file: c2800nm-adventerprisek9_ivs_li-mz.151-3.T4.bin
Return Values¶
Common return values are documented here common_return_values, the following are the fields unique to this module:
| name | despcription | returned | type | sample | |||||
|---|---|---|---|---|---|---|---|---|---|
| install_state | always | dictionary | {'sys': 'n5000-uk9.7.2.1.N1.1.bin', 'status': 'This is the log of last installation.\nContinuing with installation process, please wait.\nThe login will be disabled until the installation is completed.\nPerforming supervisor state verification.\nSUCCESS\nSupervisor non-disruptive upgrade successful.\nInstall has been successful. ', 'kick': 'n5000-uk9-kickstart.7.2.1.N1.1.bin'} | ||||||
| contains: |
| ||||||||
Note
Do not include full file paths, just the name of the file(s) stored on the top level flash directory.
Note
You must know if your platform supports taking a kickstart image as a parameter. If supplied but not supported, errors may occur.
Note
It may be useful to use this module in conjuction with ntc_file_copy and ntc_reboot.
Note
With NXOS devices, this module attempts to install the software immediately, wich may trigger a reboot.
Note
With NXOS devices, install process may take up to 10 minutes, especially if the device reboots.
Note
Tested on Nexus 3000, 5000, 9000.
Note
In check mode, the module tells you if the current boot images are set to the desired images.