New in version 2.4.
parameter | required | default | choices | comments |
---|---|---|---|---|
file_system |
no | flash: |
The remote file system of the device. If omitted, devices that support a file_system parameter will use their default values. File system indicates the storage medium and can be set to as follows, 1) 'flash:' is root directory of the flash memory on the master MPU. 2) 'slave#flash:' is root directory of the flash memory on the slave MPU. If no slave MPU exists, this drive is unavailable. 3) 'chassis ID/slot number#flash:' is root directory of the flash memory on a device in a stack. For example, 1/5#flash indicates the flash memory whose chassis ID is 1 and slot number is 5.
|
|
local_file |
yes |
Path to local file. Local directory must exist. The maximum length of local_file is 4096.
|
||
remote_file |
no |
Remote file path of the copy. Remote directories must exist. If omitted, the name of the local file will be used. The maximum length of remote_file is 4096.
|
- name: File copy test hosts: cloudengine connection: local gather_facts: no vars: cli: host: "{{ inventory_hostname }}" port: "{{ ansible_ssh_port }}" username: "{{ username }}" password: "{{ password }}" transport: cli tasks: - name: "Copy a local file to remote device" ce_file_copy: local_file: /usr/vrpcfg.cfg remote_file: /vrpcfg.cfg file_system: 'flash:' provider: "{{ cli }}"
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
changed |
check to see if a change was made on the device
|
always | boolean | True |
local_file |
The path of the local file.
|
always | string | /usr/work/vrpcfg.zip |
remote_file |
The path of the remote file.
|
always | string | /vrpcfg.zip |
transfer_result |
information about transfer result.
|
always | string | The local file has been successfully transferred to the device. |
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.