cisco.radkit.put_file module – Uploads a file to a remote device using SCP or SFTP via RADKit
Note
This module is part of the cisco.radkit collection (version 2.0.0).
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 git+https://wwwin-github.cisco.com/scdozier/cisco.radkit-ansible.git
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: cisco.radkit.put_file
.
New in cisco.radkit 1.7.5
Synopsis
Uploads a file to a remote device using SCP or SFTP via RADKit
Requirements
The below requirements are needed on the host that executes this module.
radkit
Parameters
Parameter |
Comments |
---|---|
Alternate path to client ca cert for RADKIT If the value is not specified in the task, the value of environment variable RADKIT_ANSIBLE_CLIENT_CA_PATH will be used instead. |
|
Alternate path to client cert for RADKIT If the value is not specified in the task, the value of environment variable RADKIT_ANSIBLE_CLIENT_CERT_PATH will be used instead. |
|
Client certificate password in base64 If the value is not specified in the task, the value of environment variable RADKIT_ANSIBLE_CLIENT_PRIVATE_KEY_PASSWORD_BASE64 will be used instead. |
|
Alternate path to client key for RADKIT If the value is not specified in the task, the value of environment variable RADKIT_ANSIBLE_CLIENT_KEY_PATH will be used instead. |
|
Hostname or IP address of the device as it appears in the RADKit inventory. Use either device_name or device_host. |
|
Name of device as it shows in RADKit inventory |
|
Identity to authentiate with RADKit (xxxx@cisco.com). If the value is not specified in the task, the value of environment variable RADKIT_ANSIBLE_IDENTITY will be used instead. |
|
Path to the local file to be uploaded |
|
Protocol to use for uploading, either scp or sftp |
|
Path on the remote device where the file will be uploaded |
|
Radkit service serial If the value is not specified in the task, the value of environment variable RADKIT_ANSIBLE_SERVICE_SERIAL will be used instead. |
Examples
- name: Upload file to device using SCP
put_file:
device_name: router1
local_path: /path/to/local/file
remote_path: /path/to/remote/file
protocol: scp
- name: Upload file to device using SFTP
put_file:
device_name: router1
local_path: /path/to/local/file
remote_path: /path/to/remote/file
protocol: sftp
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Status message Returned: always |