netapp.ontap.na_ontap_firmware_upgrade – NetApp ONTAP firmware upgrade for SP, shelf, ACP, and disk.
Note
This plugin is part of the netapp.ontap collection (version 21.14.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install netapp.ontap
.
To use it in a playbook, specify: netapp.ontap.na_ontap_firmware_upgrade
.
New in version 2.9.0: of netapp.ontap
Synopsis
Update ONTAP service-prosessor firmware
The recommend procedure is to 1. download the firmware package from the NetApp Support site 2. copy the package to a web server 3. download the package from the web server using this module
Once a disk qualification, disk, shelf, or ACP firmware package is downloaded, ONTAP will automatically update the related resources in background.
It may take some time to complete.
For service processor, the update requires a node reboot to take effect.
Requirements
The below requirements are needed on the host that executes this module.
Ansible 2.9
Python3 netapp-lib (2018.11.13) or later. Install using ‘pip install netapp-lib’
netapp-lib 2020.3.12 is strongly recommended as it provides better error reporting for connection issues.
A physical or virtual clustered Data ONTAP system. The modules support Data ONTAP 9.1 and onward.
REST support requires ONTAP 9.6 or later.
To enable http on the cluster you must run the following commands ‘set -privilege advanced;’ ‘system services web modify -http-enabled true;’
Parameters
Parameter |
Comments |
---|---|
path to SSL client cert file (.pem). not supported with python 2.6. |
|
Clear logs on the device after update. Default value is true. Not used if force_disruptive_update is False. Choices:
|
|
disk firmware to be updated to. Not used if force_disruptive_update is False (ONTAP will automatically select the firmware) |
|
The firmware download may take time if the web server is slow and if there are many nodes in the cluster. ONTAP will break the ZAPI connection after 5 minutes with a 502 Bad Gateway error, even though the download is still happening. By default, this module ignores this error and assumes the download is progressing as ONTAP does not provide a way to check the status. When setting this option to true, the module will report 502 as an error. Choices:
|
|
Enable or disable a new feature. This can be used to enable an experimental feature or disable a new feature that breaks backward compatibility. Supported keys and values are subject to change without notice. Unknown keys are ignored. |
|
Type of firmware to be upgraded. Options include shelf, ACP, service-processor, and disk. For shelf firmware upgrade the operation is asynchronous, and therefore returns no errors that might occur during the download process. Shelf firmware upgrade is idempotent if shelf_module_fw is provided . disk firmware upgrade is idempotent if disk_fw is provided . With check mode, SP, ACP, disk, and shelf firmware upgrade is not idempotent. This operation will only update firmware on shelves/disk that do not have the latest firmware-revision. For normal operations, choose one of storage or service-processor. Type storage includes acp, shelf and disk and ONTAP will automatically determine what to do. Choices:
|
|
If set to Do not set this to It will force an update even if the resource is not ready for it, and can be disruptive. Choices:
|
|
The hostname or IP address of the ONTAP instance. |
|
Override the default port (80 or 443) with this port |
|
Enable and disable https. Ignored when using REST as only https is supported. Ignored when using SSL certificate authentication as it requires SSL. Choices:
|
|
Install the version packaged with ONTAP if this parameter is set to true. Otherwise, package must be used to specify the package to install. Not used if force_disruptive_update is False (ONTAP will automatically select the firmware) Choices:
|
|
path to SSL client key file. |
|
Node on which the device is located. Not required if package_url is present and force_disruptive_update is False. If this option is not given, the firmware will be downloaded on all nodes in the cluster, and the resources will be updated in background on all nodes, except for service processor. For service processor, the upgrade will happen automatically when each node is rebooted. |
|
The ontap api version to use |
|
Name of the package file containing the firmware to be installed. Not required when -baseline is true. Not used if force_disruptive_update is False. |
|
URL of the package file containing the firmware to be downloaded. Once the package file is downloaded to a node, the firmware update will happen automatically in background. For SP, the upgrade will happen automatically when a node is rebooted. For SP, the upgrade will happen automatically if autoupdate is enabled (which is the recommended setting). |
|
Password for the specified user. |
|
Reboot service processor before downloading package. Only available if ‘firmware_type’ is ‘service-processor’. Choices:
|
|
Rename the package. Only available if ‘firmware_type’ is ‘service-processor’. |
|
Replace the local package. Only available if ‘firmware_type’ is ‘service-processor’. Choices:
|
|
Shelf module firmware to be updated to. Not used if force_disruptive_update is False (ONTAP will automatically select the firmware) |
|
Whether the specified ONTAP firmware should be upgraded or not. Default: “present” |
|
Type of firmware update to be performed. Options include serial_full, serial_differential, network_full. Not used if force_disruptive_update is False (ONTAP will automatically select the firmware) |
|
REST API if supported by the target system for all the resources and attributes the module requires. Otherwise will revert to ZAPI. always – will always use the REST API never – will always use the ZAPI auto – will try to use the REST Api Default: “auto” |
|
This can be a Cluster-scoped or SVM-scoped account, depending on whether a Cluster-level or SVM-level API is required. For more information, please read the documentation https://mysupport.netapp.com/NOW/download/software/nmsdk/9.4/. Two authentication methods are supported
To use a certificate, the certificate must have been installed in the ONTAP cluster, and cert authentication must have been enabled. |
|
If set to This should only set to Choices:
|
Examples
- name: firmware upgrade
na_ontap_firmware_upgrade:
state: present
package_url: "{{ web_link }}"
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: firmware upgrade, confirm successful download
na_ontap_firmware_upgrade:
state: present
package_url: "{{ web_link }}"
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
fail_on_502_error: true
- name: SP firmware upgrade
na_ontap_firmware_upgrade:
state: present
node: vsim1
package: "{{ file name }}"
package_url: "{{ web_link }}"
clear_logs: True
install_baseline_image: False
update_type: serial_full
force_disruptive_update: False
firmware_type: service-processor
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: SP firmware download replace package
tags:
- sp_download
na_ontap_firmware_upgrade:
state: present
node: vsim1
package_url: "{{ web_link }}"
firmware_type: service-processor
replace_package: true
reboot_sp: true
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
https: true
validate_certs: false
- name: SP firmware download rename package
tags:
- sp_download
na_ontap_firmware_upgrade:
state: present
node: vsim1
package_url: "{{ web_link }}"
firmware_type: service-processor
rename_package: SP_FW.zip
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
https: true
validate_certs: false
- name: ACP firmware download and upgrade
na_ontap_firmware_upgrade:
state: present
node: vsim1
firmware_type: acp
force_disruptive_update: False
package_url: "{{ web_link }}"
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: shelf firmware upgrade
na_ontap_firmware_upgrade:
state: present
firmware_type: shelf
shelf_module_fw: 1221
force_disruptive_update: False
package_url: "{{ web_link }}"
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: disk firmware upgrade
na_ontap_firmware_upgrade:
state: present
firmware_type: disk
disk_fw: NA02
force_disruptive_update: False
package_url: "{{ web_link }}"
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Returns additional information in case of success. Returned: always |
Authors
NetApp Ansible Team (@carchi8py) <ng-ansibleteam@netapp.com>