mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
random_string: Specify seed while generating random string (#10710)
* random_string: Specify seed while generating random string * Allow user to specify seed to generate random string Fixes: #5362 Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com> * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> --------- Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
ded43714d3
commit
b5a2c5812c
3 changed files with 33 additions and 4 deletions
|
|
@ -21,6 +21,8 @@
|
|||
result11: "{{ query('community.general.random_string', base64=true, length=8) }}"
|
||||
result12: "{{ query('community.general.random_string', upper=false, numbers=false, special=false) }}" # all lower case
|
||||
result13: "{{ query('community.general.random_string', override_all='0', length=2) }}"
|
||||
result14: "{{ query('community.general.random_string', seed='1234') }}"
|
||||
result15: "{{ query('community.general.random_string', seed='1234') }}"
|
||||
|
||||
- name: Raise error when impossible constraints are provided
|
||||
set_fact:
|
||||
|
|
@ -51,3 +53,4 @@
|
|||
- result13[0] == '00'
|
||||
- impossible_result is failed
|
||||
- "'Available characters cannot' in impossible_result.msg"
|
||||
- result15[0] == result14[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue