dellemc.enterprise_sonic.sonic_image_management module – Manage installation of Enterprise SONiC image, software patch and firmware updater
Note
This module is part of the dellemc.enterprise_sonic collection (version 3.0.0).
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 dellemc.enterprise_sonic
.
To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_image_management
.
New in dellemc.enterprise_sonic 2.4.0
Synopsis
Manage installation of Enterprise SONiC image, software patch and firmware updater.
Parameters
Parameter |
Comments |
---|---|
Manage installation of Firmware updater |
|
Specifies the firmware updater manangement operation to be performed.
Choices:
|
|
When command=install, specifies the path of the firmware updater to be staged. Path can be a file in the device (file://filepath) or URL (http:// or https://). |
|
Manage installation of Enterprise SONiC image. |
|
Specifies the image manangement operation to be performed.
Choices:
|
|
GPG Key server URL. Required when command=gpg-key. |
|
When command=remove or command=set-default specifies the name of the image. When command=remove, name can be specified as |
|
When command=install or command=verify specifies the path of the image to be installed. Path can be a file in the device (file://filepath) or URL (http:// or https://). |
|
Specifies the certificate for signature file. Required when command=verify and verifymethod=pki. |
|
GPG Key ID to be installed. Required when command=gpg-key. |
|
GPG/PKI file to be verified. Required when command=verify. |
|
Image verification GPG or PKI method Required when command=verify. Choices:
|
|
Manage installation of software patch. |
|
Specifies the patch manangement operation to be performed.
Choices:
|
|
When command=rollback, specifies the name of the patch. |
|
When command=install, specifies the path of the patch to be installed. Path can be a file in the device (file://filepath) or URL (http:// or https://). |
Examples
- name: Install Enterprise SONiC image
dellemc.enterprise_sonic.sonic_image_management:
image:
command: install
path: 'file://home/admin/sonic.bin'
- name: Get image installation status
dellemc.enterprise_sonic.sonic_image_management:
image:
command: get-status
- name: Get list of installed images
dellemc.enterprise_sonic.sonic_image_management:
image:
command: get-list
- name: Stage a firmware updater
dellemc.enterprise_sonic.sonic_image_management:
firmware:
command: install
path: 'file://home/admin/onie-update-full.bin'
- name: Install GPG Key for image verification
dellemc.enterprise_sonic.sonic_image_management:
image:
command: gpg-key
keyserver: 'hkp://keyserver.ubuntu.com:80'
pubkeyid: 'DAFWQGEW12345678'
- name: Verify Enterprise SONiC image
dellemc.enterprise_sonic.sonic_image_management:
image:
command: verify
path: 'home://sonic.bin'
verifymethod: 'gpg'
signaturefile: 'sign.gpg'
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Details returned by the specified get operation. Returned: when command=get-status or command=get-list or command=get-history Sample: |
|
Status of the operation performed. Returned: when command is not Sample: |