Use eos_config for eos_user tests teardown (#26893)

Purge is not idempotent, so let's fix it with other change.
For teardown, it's better to use eos_config/eos_command.
pull/26895/head
Ricardo Carrillo Cruz 7 years ago committed by GitHub
parent baa9290d71
commit bd24c4ce9d

@ -31,13 +31,9 @@
- 'result.commands == ["username test1 role network-operator", "username test2 role network-operator"]'
- name: tearDown
eos_user:
purge: yes
authorize: yes
eos_config:
lines:
- no username netend
- no username test1
- no username test2
provider: "{{ cli }}"
register: result
- assert:
that:
- 'result.changed == true'
- 'result.commands == ["no username netend", "no username test1", "no username test2"]'

Loading…
Cancel
Save