This task plugin uses nornir-netmiko netmiko_send_config task to configuration commands to devices over SSH or Telnet.

netmiko_send_config exists as part of nornir_salt repository to facilitate per-host configuration rendering performed by SALT prior to running the task.


netmiko_send_config sample usage

Code to invoke netmiko_send_config task:

from nornir_salt import netmiko_send_config

output =
    commands=["sinterface loopback 0", "description 'configured by script'"]

netmiko_send_config returns

Returns Nornir results object with individual tasks names set equal to commands sent to device.

netmiko_send_config reference

nornir_salt.plugins.tasks.netmiko_send_config.netmiko_send_config(task: nornir.core.task.Task, config=None, commit=True, **kwargs)

Salt-nornir Task function to send configuration to devices using nornir_netmiko.tasks.netmiko_send_config plugin.

  • kwargs – (dict) any additional arguments to use with nornir_netmiko.tasks.netmiko_send_config task plugin

  • config – (str or list) configuration string or list of commands to send to device

  • commit – (bool or dict) by default commit is True, as a result host connection commit method will be called. If commit argument is a dictionary, it will be supplied to commit call using **commit.

  • kwargs – any additional **kwargs for netmiko_send_config function.

Return result

Nornir result object with task execution results

Default parameters supplied to netmiko_send_config function call:

cmd_verify: False