11/8/2022 0 Comments Ansible generate random string![]() ![]() If you want to have a random password per host + client or whateverĪll you need to do to is use some templating and set the store path based on those parameters. lookup Generates random string Note This lookup plugin is part of the community.general collection (version 5.5.0). Because you are using /dev/null as store path, you are forcing ansible to generate a new random password because everytime it checks for existence it finds nothing. If you are a Red Hat customer, refer to the Ansible Automation Platform Life Cycle page for subscription details. Ansible: Generating random string using Password lookup plugin While writing your automation using Ansible, sometime you require to generate random string. So, first time it checks if the specified path exists, and if not generates a random password and stores it on that path, subsequent lookups will just retrieve it. Generates a random plaintext password and stores it in a file at a given filepath.īy definition,the lookup password generates a random password AND stores it on the specified path for subsequent lookups. The following command will do just that.The problem is that you are using the password module wrong, or at least according to the latest documentation (maybe this a new feature on 2.5): ![]() Now we can create an encrypted SSH password for our remote host using that passphrase.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |