Cisco IOS-XE Activate

Cisco IOS-XE Activate

Certified
Enterprise Edition

Stage an image on a Cisco IOS-XE device (install add)

Runs install add file bootflash: <image>: the image is unpacked and validated but not activated, and the device does not reload. Use the Reload task to activate it.

Before anything is sent, the task checks that the device is in install mode, that no install is in progress (a running auto-abort timer, or a package in U state at a version other than the running one), that the image is on bootflash with enough free space and, when expectedHash is set, that its hash matches. Each failed precondition raises an ActivateFailedException with a reason (BUNDLE_MODE, INSTALL_IN_PROGRESS, MISSING_FILE, NO_SPACE, CHECKSUM). A FAILED: line returned by the device is mapped to PLATFORM_MISMATCH or another reason, or UNKNOWN with the raw line.

The task can be retried: when the target is already added, or already activated and committed, it returns alreadyAdded: true and sends nothing. previousBootImage is the boot variable before the task (in install mode normally bootflash: packages.conf) and previousVersion the version a rollback returns to.

yaml
type: io.kestra.plugin.ee.cisco.iosxe.Activate

Add an image that is already on bootflash

yaml
id: cisco_iosxe_activate
namespace: company.network

tasks:
  - id: add
    type: io.kestra.plugin.ee.cisco.iosxe.Activate
    host: core1.example.net
    username: automation
    password: "{{ secret('CISCO_PASSWORD') }}"
    enableSecret: "{{ secret('CISCO_ENABLE_SECRET') }}"
    hostKeyFingerprint: "{{ secret('CORE1_HOST_KEY_FINGERPRINT') }}"
    image: cat9k_iosxe.17.12.03.SPA.bin
    targetVersion: 17.12.3
    expectedHash: "{{ secret('CAT9K_17_12_03_SHA512') }}"
Installation

This Enterprise plugin requires an Enterprise image and access to the plugin registry. Install it with the following command:

kestractl plugins get io.kestra.plugin.ee:plugin-ee-cisco --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version.

Properties

Device host name or IP address

Image file name on bootflash

Username

The account must have privilege 15, or an enableSecret to reach it.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
DefaultPT2M

Default timeout of a single command

1 second to 1 hour, default 2 minutes. Tasks that run long operations (copy, install) have their own timeout properties.

DefaultPT30S

TCP and SSH connect timeout

1 second to 5 minutes, default 30 seconds.

Defaultfalse

Disable SSH host key verification

Explicit opt-out: the device identity is no longer verified, which exposes the credentials to a man-in-the-middle. Use for labs only.

Enable secret

Used to enter privileged EXEC mode when the login lands in user EXEC mode (host> prompt).

Expected hash of the image

When set, the image is verified on the device before install add.

SHA256 fingerprint of the device SSH host key

Format SHA256: abc..., as printed by ssh-keygen -lf. Host key verification is on by default, so this property is required unless disableHostKeyVerification is true. Cisco IOS-XE offers RSA host keys.

DefaultPT30M

Timeout of the install, copy or verify command itself

1 second to 24 hours, default 30 minutes.

Password

Required unless privateKey is set.

Default22

SSH port

1 to 65535, default 22.

SSH private key

PEM content of the private key. Used instead of password when set.

Passphrase of the private key

Default1.25

Free space factor

Bootflash needs image size x factor free to unpack the image, and at least 1 GiB. 1.0 to 10.0, default 1.25.

Version contained in the image

Used to recognise an image that is already added, or already activated and committed. Padded and unpadded forms are equal (17.09.04a = 17.9.4a).

DefaultSHA512
Possible Values
SHA512MD5

Hash algorithm

SHA512 (default) or MD5.

Added version

Version of the added image, as reported by the device or given in targetVersion (a Cisco extra).

Already added

True when the image was already added (or already active and committed), so install add was skipped and nothing was sent.

Image file

File name of the image on bootflash, for example cat9k_iosxe.17.12.03.SPA.bin.

Previous boot image

Boot variable before this task, as show version reports it. In install mode it is normally bootflash: packages.conf, which does not name the version a rollback returns to: see previousVersion.

Previous version

Version running on the device before the image was added, that is what a rollback returns to.