mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-08 02:01:31 -07:00
nxos_file_copy enhancement (#42424)
* add file_pull option * typo correction * fix shippable error * review comments * fix for review comments by mwiebe * possible shippable fix * remove file_copy from ignore * more review comments addressed * review comments * add localhost for remote scp server in tests * timeout fix
This commit is contained in:
parent
a488b3a8ed
commit
fa5f396a4b
3 changed files with 218 additions and 46 deletions
|
@ -6,6 +6,7 @@
|
|||
commands:
|
||||
- terminal dont-ask
|
||||
- delete network-integration.cfg
|
||||
- delete network-integration_copy.cfg
|
||||
ignore_errors: yes
|
||||
|
||||
- name: "Setup - Turn on feature scp-server"
|
||||
|
@ -53,10 +54,25 @@
|
|||
|
||||
- assert: *false
|
||||
|
||||
- name: "Setup - Remove existing file"
|
||||
nxos_command: *remove_file
|
||||
- name: "Copy file using file_pull"
|
||||
nxos_file_copy: ©_pull
|
||||
file_pull: True
|
||||
file_pull_timeout: 1200
|
||||
local_file: "network-integration_copy.cfg"
|
||||
remote_file: "/network-integration.cfg"
|
||||
remote_scp_server: "{{ inventory_hostname_short }}"
|
||||
remote_scp_server_user: "{{ ansible_ssh_user }}"
|
||||
remote_scp_server_password: "{{ ansible_ssh_pass }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: "Overwrite the file"
|
||||
nxos_file_copy: *copy_pull
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
rescue:
|
||||
|
||||
- debug: msg="TRANSPORT:CLI nxos_file_copy failure detected"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue