Fixes for nxos_config integration tests (#34579)

* deletage_to: localhost -> connection: local

* Fix test setup
pull/34602/head
Nathaniel Case 7 years ago committed by GitHub
parent 42dd48a6d0
commit 46263d77f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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:

@ -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'

Loading…
Cancel
Save