[PR #7242/c3fd14e1 backport][stable-7] Ignore similar chars in random_string (#7292)

Ignore similar chars in random_string (#7242)

* Added the option to ignore certain characters

This can be usefull for eliminating confusion.

* Removed the loop and added each char_sets

The variable name is not known inside the loop so updating it does not work.

* Changelog fragment file

* Forgot the file extention for the fragment yaml file

* Update plugins/lookup/random_string.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/lookup/random_string.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/lookup/random_string.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c3fd14e18f)

Co-authored-by: Gustav Alerby <g.alerby@gmail.com>
This commit is contained in:
patchback[bot] 2023-09-20 22:04:29 +02:00 committed by GitHub
commit 61e82c50e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- random_string - added new ``ignore_similar_chars`` and ``similar_chars`` option to ignore certain chars (https://github.com/ansible-collections/community.general/pull/7242).