Fix iosxr copy and delete tasks (#44083)

* Fix iosxr copy and delete tasks

* Drop local from non-smoke tasks
pull/44092/head
Nathaniel Case 6 years ago committed by GitHub
parent bb85bbceeb
commit 5a49567c71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,11 +14,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
# Only one of the Testcase would be run to check if `connection: local`
# is established. Full suite is run with `connection:network_cli` or `connection:netconf`
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
with_first_found: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -14,9 +14,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
with_first_found: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -23,14 +23,13 @@
- "result.failed == true"
- "result.msg is defined"
- name: Remove existing file if any
- name: delete config file on disk to prevent failure of copy task for duplicate
cli_command:
command: 'delete harddisk:ansible_tmp.txt'
prompt: 'Delete harddisk\:ansible_tmp\.txt\[confirm\]'
answer: "\r\n"
prompt: 'Delete harddisk\:/?ansible_tmp\.txt\[confirm\]'
answer: ""
ignore_errors: yes
- block:
- name: Run command with prompt
cli_command:
command: 'copy running-config harddisk:ansible_tmp.txt'
@ -42,12 +41,5 @@
that:
- "result.stdout is defined"
- "'ansible_tmp' in result.stdout"
always:
- name: Remove copied file
cli_command:
command: 'delete harddisk:ansible_tmp.txt'
prompt: 'Delete harddisk\:ansible_tmp\.txt\[confirm\]'
answer: "\r\n"
ignore_errors: yes
- debug: msg="END cli/cli_command.yaml on connection={{ ansible_connection }}"

@ -1,12 +1,13 @@
---
- debug: msg="START cli/prompt.yaml on connection={{ ansible_connection }}"
- debug:
msg: "START cli/prompt.yaml on connection={{ ansible_connection }}"
- name: delete config file on disk to prevent failure of copy task for duplicate
iosxr_command:
commands:
- command: 'delete harddisk:ansible_tmp.txt'
prompt: 'Delete harddisk\:ansible_tmp\.txt\[confirm\]'
answer: "\r\n"
prompt: 'Delete harddisk\:/?ansible_tmp\.txt\[confirm\]'
answer: ""
ignore_errors: yes
- name: copy

@ -14,9 +14,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
with_first_found: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -14,9 +14,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
with_first_found: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -14,11 +14,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
# Only one of the Testcase would be run to check if `connection: local`
# is established. Full suite is run with `connection:network_cli` or `connection:netconf`
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
with_first_found: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -15,13 +15,5 @@
loop_control:
loop_var: test_case_to_run
# Only one of the Testcase would be run to check if `connection: local`
# is established. Full suite is run with `connection:network_cli` or `connection:netconf`
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
with_first_found: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: reset connection
meta: reset_connection

@ -14,9 +14,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
with_first_found: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -15,10 +15,8 @@
loop_control:
loop_var: test_case_to_run
# Only one of the Testcase would be run to check if `connection: local`
# is established. Full suite is run with `connection:network_cli` or `connection:netconf`
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
with_first_found: "{{ test_items }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -15,10 +15,8 @@
loop_control:
loop_var: test_case_to_run
# Only one of the Testcase would be run to check if `connection: local`
# is established. Full suite is run with `connection:network_cli` or `connection:netconf`
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
with_first_found: "{{ test_items }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -25,11 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
# Only one of the Testcase would be run to check if `connection: local`
# is established. Full suite is run with `connection:network_cli` or `connection:netconf`
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
with_first_found: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

Loading…
Cancel
Save