From 028f79a86bddcf757f902ee52214d107cb3c4431 Mon Sep 17 00:00:00 2001 From: Jiri Tyr Date: Thu, 7 Jun 2018 23:26:25 +0100 Subject: [PATCH] Adding the Ansible way how to create a password hash --- docs/docsite/rst/reference_appendices/faq.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/docsite/rst/reference_appendices/faq.rst b/docs/docsite/rst/reference_appendices/faq.rst index 56c0103a35..393a29ccf3 100644 --- a/docs/docsite/rst/reference_appendices/faq.rst +++ b/docs/docsite/rst/reference_appendices/faq.rst @@ -410,7 +410,13 @@ but the exact files to edit vary depending on your OS and distribution and local How do I generate crypted passwords for the user module? ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -The mkpasswd utility that is available on most Linux systems is a great option: +Ansible ad-hoc command is the easiest option: + +.. code-block:: shell-session + + ansible all -i localhost, -m debug -a "msg={{ 'mypassword' | password_hash('sha512', 'mysecretsalt') }}" + +The mkpasswd utility that is available on most Linux systems is also a great option: .. code-block:: shell-session