Fixes for nxos_config integration tests (#34579)

* deletage_to: localhost -> connection: local

* Fix test setup
This commit is contained in:
Nathaniel Case 2018-01-08 10:56:47 -05:00 committed by GitHub
parent 42dd48a6d0
commit 46263d77f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 16 deletions

View file

@ -17,11 +17,11 @@
provider: "{{ connection }}"
- name: collect any backup files
find:
find: &backups
paths: "{{ role_path }}/backup"
pattern: "{{ inventory_hostname_short }}_config*"
connection: local
register: backup_files
delegate_to: localhost
- name: delete backup files
file:
@ -46,11 +46,9 @@
- "result.updates is defined"
- name: collect any backup files
find:
paths: "{{ role_path }}/backup"
pattern: "{{ inventory_hostname_short }}_config*"
find: *backups
connection: local
register: backup_files
delegate_to: localhost
- assert:
that:

View file

@ -4,12 +4,8 @@
when: ansible_connection == "local"
- name: setup
nxos_config:
lines:
- 10 permit ip 1.1.1.1/32 any log
- 20 permit ip 2.2.2.2/32 any log
- 30 permit ip 3.3.3.3/32 any log
parents: ip access-list test
nxos_config: &clear
lines: no ip access-list test
provider: "{{ connection }}"
match: none
@ -51,9 +47,6 @@
- "result.changed == false"
- name: teardown
nxos_config:
lines: no ip access-list test
provider: "{{ connection }}"
match: none
nxos_config: *clear
- debug: msg='END connection={{ ansible_connection }}/sublevel_block.yaml'