Cisco IOS-XE RunCommands

Cisco IOS-XE RunCommands

Certified
Enterprise Edition

Run read-only commands on a Cisco IOS-XE device

Runs show, dir and verify commands over SSH (at most 50 per task) and stores the raw text of each one in internal storage; the uri of every result points to it. For the commands the plugin has a parser for (show version, show boot, dir bootflash: , show install summary, show install rollback, show ip ospf neighbor [detail], show etherchannel summary, show interfaces status, show lldp neighbors detail, show cdp neighbors detail) the structured result is returned too, inline.

Every other command (reload, install, configure, copy, delete, write...) is rejected before the connection is opened: those paths exist only in the guarded tasks. Secrets in the output are masked on a best-effort basis before it is stored, and the commands that dump secrets in formats that cannot be masked (show crypto isakmp key, show key chain, show snmp community, show snmp user, show archive log config) are rejected. The output of one command is cut after 16 million characters.

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

Read the install state of a Catalyst 9500

yaml
id: cisco_iosxe_run_commands
namespace: company.network

tasks:
  - id: show
    type: io.kestra.plugin.ee.cisco.iosxe.RunCommands
    host: core1.example.net
    username: automation
    password: "{{ secret('CISCO_PASSWORD') }}"
    enableSecret: "{{ secret('CISCO_ENABLE_SECRET') }}"
    hostKeyFingerprint: "{{ secret('CORE1_HOST_KEY_FINGERPRINT') }}"
    commands:
      - show version
      - show install summary
      - "dir bootflash:"

  - id: log_version
    type: io.kestra.plugin.core.log.Log
    message: "{{ outputs.show.results[0].parsed.version }}"
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.

Properties
SubTypestring

Commands to run

Only show, dir and verify, at most 50 per task. Output modifiers: include, exclude, begin, section, count.

Device host name or IP address

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).

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.

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

One entry per command, in the order they were given

Definitions
commandstring

The command as sent

parsedobject

Structured output, for the commands that have a parser. null otherwise

uristring
Formaturi

Raw output, in internal storage

Prompts, banners and paging are removed and secrets masked (best effort).