mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
fix prompt error when deleting ios user (#28175)
* fix prompt error when deleting ios user * placate pep8 * wrap delete user command in function * fix python 3 unit tests
This commit is contained in:
parent
ce3d1c6ba0
commit
a37c5e53e6
3 changed files with 51 additions and 8 deletions
|
@ -1,4 +1,15 @@
|
|||
---
|
||||
- name: tear down old users if they exist (Setup)
|
||||
ios_user:
|
||||
aggregate:
|
||||
- name: ansibletest1
|
||||
- name: ansibletest2
|
||||
- name: ansibletest3
|
||||
state: absent
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- name: Create user (SetUp)
|
||||
ios_user:
|
||||
name: ansibletest1
|
||||
|
@ -75,4 +86,6 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- 'result.commands == ["no username ansibletest1", "no username ansibletest2", "no username ansibletest3"]'
|
||||
- '"no username ansibletest1" in result.commands[0]'
|
||||
- '"no username ansibletest2" in result.commands[1]'
|
||||
- '"no username ansibletest3" in result.commands[2]'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue