ansible / ansible.builtin / v2.5.10 / module / nxos_file_copy Copy a file to a remote NXOS device over SCP. | "added in version" 2.2 of ansible.builtin" Authors: Jason Edelman (@jedelman8), Gabriele Gerbino (@GGabriele) preview | supported by networkansible.builtin.nxos_file_copy (v2.5.10) — module
pip
Install with pip install ansible==2.5.10
Copy a file to the flash (or bootflash) remote network device on NXOS devices.
- nxos_file_copy: local_file: "./test_file.txt" remote_file: "test_file.txt" provider: "{{ cli }}" connect_ssh_port: "{{ ansible_ssh_port }}"
local_file: description: - Path to local file. Local directory must exist. required: true file_system: default: null description: - The remote file system of the device. If omitted, devices that support a I(file_system) parameter will use their default values. required: false remote_file: default: null description: - Remote file path of the copy. Remote directories must exist. If omitted, the name of the local file will be used. required: false connect_ssh_port: default: 22 description: - SSH port to connect to server during transfer of file required: false version_added: '2.5' version_added_collection: ansible.builtin
local_file: description: The path of the local file. returned: success sample: /path/to/local/file type: string remote_file: description: The path of the remote file. returned: success sample: /path/to/remote/file type: string transfer_status: description: Whether a file was transferred. "No Transfer" or "Sent". returned: success sample: Sent type: string