Skip to content

Commit

Permalink
Fixes for nxos_config integration tests (ansible#34579)
Browse files Browse the repository at this point in the history
* deletage_to: localhost -> connection: local

* Fix test setup
  • Loading branch information
Qalthos authored Jan 8, 2018
1 parent 42dd48a commit 46263d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
10 changes: 4 additions & 6 deletions test/integration/targets/nxos_config/tests/common/backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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'

0 comments on commit 46263d7

Please sign in to comment.