2018-05-24 09:48:29 +02:00
|
|
|
---
|
2018-08-13 20:20:28 +02:00
|
|
|
- debug:
|
|
|
|
msg: "START cli/prompt.yaml on connection={{ ansible_connection }}"
|
2018-05-24 09:48:29 +02:00
|
|
|
|
|
|
|
- name: delete config file on disk to prevent failure of copy task for duplicate
|
|
|
|
iosxr_command:
|
|
|
|
commands:
|
|
|
|
- command: 'delete harddisk:ansible_tmp.txt'
|
2018-08-13 20:20:28 +02:00
|
|
|
prompt: 'Delete harddisk\:/?ansible_tmp\.txt\[confirm\]'
|
|
|
|
answer: ""
|
2018-05-24 09:48:29 +02:00
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: copy
|
|
|
|
iosxr_command:
|
|
|
|
commands:
|
|
|
|
- command: 'copy running-config harddisk:ansible_tmp.txt'
|
|
|
|
prompt: 'Destination file name \(control-c to abort\)\: \[\/ansible_tmp.txt\]\?'
|
|
|
|
answer: 'ansible_tmp.txt'
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.stdout is defined"
|
|
|
|
- "'ansible_tmp' in result.stdout[0]"
|
|
|
|
|
|
|
|
- debug: msg="END cli/prompt.yaml on connection={{ ansible_connection }}"
|