mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Add support for hashed password (#49464)
* Add support for hashed password Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Fix Shippable errors Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Make pwd options mutually exclusive Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7bdca72713
commit
d729614d72
@@ -7,6 +7,7 @@
|
||||
- name: ansibletest3
|
||||
- name: ansibletest4
|
||||
- name: ansibletest5
|
||||
- name: ansibletest6
|
||||
state: absent
|
||||
provider: "{{ cli }}"
|
||||
|
||||
@@ -94,6 +95,20 @@
|
||||
- 'result.changed == true'
|
||||
- "'username ansibleuser5 secret' in result.commands[0]"
|
||||
|
||||
- name: Create user with hashed_password
|
||||
ios_user:
|
||||
name: ansibleuser6
|
||||
hashed_password:
|
||||
type: 5
|
||||
value: $3$8JcDilcYgFZi.yz4ApaqkHG2.8/
|
||||
state: present
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- "'username ansibleuser6 secret' in result.commands[0]"
|
||||
|
||||
- name: tearDown
|
||||
ios_user:
|
||||
aggregate:
|
||||
@@ -102,6 +117,7 @@
|
||||
- name: ansibletest3
|
||||
- name: ansibletest4
|
||||
- name: ansibletest5
|
||||
- name: ansibletest6
|
||||
state: absent
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
Reference in New Issue
Block a user