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.
This commit is contained in:
Ricardo Carrillo Cruz 2017-07-17 14:28:03 +02:00 committed by GitHub
parent baa9290d71
commit bd24c4ce9d

View file

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