From e0b3f28866d9b2769e20096d8a75a3297f51d866 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Fri, 15 Nov 2024 08:22:06 -0800 Subject: [PATCH] Added examples for password_hash Fixes: #84318 Signed-off-by: Abhijeet Kasurde --- lib/ansible/plugins/filter/password_hash.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ansible/plugins/filter/password_hash.yml b/lib/ansible/plugins/filter/password_hash.yml index 5776cebfc5d..290f8bd9def 100644 --- a/lib/ansible/plugins/filter/password_hash.yml +++ b/lib/ansible/plugins/filter/password_hash.yml @@ -32,6 +32,14 @@ EXAMPLES: | # pwdhash => "$6$/bQCntzQ7VrgVcFa$VaMkmevkY1dqrx8neaenUDlVU.6L/.ojRbrnI4ID.yBHU6XON1cB422scCiXfUL5wRucMdLgJU0Fn38uoeBni/" pwdhash: "{{ 'testing' | password_hash }}" + # Using hash type + # wireguard_admin_password_hash => "$2b$12$ujYVRD9v9z87lpvLqeWNuOFDI4QzSSYHoRyYydW6XK4.kgqfwOXzO" + wireguard_admin_password_hash: "{{ 'vagrant-libvirt' | password_hash(hashtype='bcrypt') }}" + + # Using salt value for idempotency + # wireguard_admin_password_hash => "$2b$12$abcdefghijklmnopqrstuuTEw8POU2MwwuYEM7WaKcjqZ948Hm7.W" + wireguard_admin_password_hash: "{{ 'vagrant-libvirt' | password_hash(hashtype='bcrypt', salt='abcdefghijklmnopqrstuv') }}" + RETURN: _value: description: The resulting password hash.