community.network.ce_file_copy – Copy a file to a remote cloudengine device over SCP on HUAWEI CloudEngine switches.¶
Note
This plugin is part of the community.network collection (version 2.1.1).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.ce_file_copy
.
Parameters¶
Notes¶
Note
The feature must be enabled with feature scp-server.
If the file is already present, no transfer will take place.
This module requires the netconf system service be enabled on the remote device being managed.
Recommended connection is
netconf
.This module also works with
local
connections for legacy playbooks.
Examples¶
- 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"
community.network.ce_file_copy:
local_file: /usr/vrpcfg.cfg
remote_file: /vrpcfg.cfg
file_system: 'flash:'
provider: "{{ cli }}"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Zhou Zhijin (@QijunPan)