Fix connection type in junos integration tests (#34583)

* Fix connection type in junos integration tests

*  For find module in junos integration test
   add connection type local and delegate task to localhost

* Fix review comment
This commit is contained in:
Ganesh Nalawade 2018-01-08 23:22:53 +05:30 committed by GitHub
parent dc85176512
commit 458cc38992
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 22 additions and 10 deletions

View file

@ -2,6 +2,7 @@
find:
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items

View file

@ -3,6 +3,7 @@
find:
paths: "{{ role_path }}/tests/netconf_json"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items

View file

@ -3,6 +3,7 @@
find:
paths: "{{ role_path }}/tests/netconf_text"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items

View file

@ -3,6 +3,7 @@
find:
paths: "{{ role_path }}/tests/netconf_xml"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items

View file

@ -3,6 +3,7 @@
find:
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items

View file

@ -13,12 +13,13 @@
paths: "{{ role_path }}/backup"
pattern: "{{ inventory_hostname_short }}_config*"
register: backup_files
delegate_to: localhost
connection: local
- name: delete backup files
file:
path: "{{ item.path }}"
state: absent
connection: local
with_items: "{{backup_files.files|default([])}}"
- name: configure device with config
@ -38,7 +39,7 @@
paths: "{{ role_path }}/backup"
pattern: "{{ inventory_hostname_short }}_config*"
register: backup_files
delegate_to: localhost
connection: local
- assert:
that:

View file

@ -2,6 +2,7 @@
find:
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items

View file

@ -3,8 +3,8 @@
find:
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
delegate_to: localhost
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

View file

@ -3,8 +3,8 @@
find:
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
delegate_to: localhost
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

View file

@ -4,7 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
delegate_to: localhost
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

View file

@ -4,7 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
delegate_to: localhost
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

View file

@ -4,7 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
delegate_to: localhost
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

View file

@ -4,7 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
delegate_to: localhost
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

View file

@ -4,6 +4,7 @@
paths: "{{ role_path }}/tests/cli"
patterns: "{{ testcase }}.yaml"
register: test_cases
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

View file

@ -3,6 +3,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

View file

@ -4,7 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
delegate_to: localhost
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

View file

@ -4,7 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
delegate_to: localhost
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

View file

@ -4,6 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

View file

@ -3,6 +3,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

View file

@ -3,6 +3,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"