summaryrefslogtreecommitdiffstats
path: root/lib/ansible/plugins/filter/password_hash.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:21 +0000
commit8a754e0858d922e955e71b253c139e071ecec432 (patch)
tree527d16e74bfd1840c85efd675fdecad056c54107 /lib/ansible/plugins/filter/password_hash.yml
parentInitial commit. (diff)
downloadansible-core-8a754e0858d922e955e71b253c139e071ecec432.tar.xz
ansible-core-8a754e0858d922e955e71b253c139e071ecec432.zip
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/ansible/plugins/filter/password_hash.yml')
-rw-r--r--lib/ansible/plugins/filter/password_hash.yml37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/ansible/plugins/filter/password_hash.yml b/lib/ansible/plugins/filter/password_hash.yml
new file mode 100644
index 0000000..d12efb4
--- /dev/null
+++ b/lib/ansible/plugins/filter/password_hash.yml
@@ -0,0 +1,37 @@
+DOCUMENTATION:
+ name: password_hash
+ version_added: "historical"
+ short_description: convert input password into password_hash
+ description:
+ - Returns a password_hash of a secret.
+ positional: _input
+ notes:
+ - Algorithms available might be restricted by the system.
+ options:
+ _input:
+ description: Secret to hash.
+ type: string
+ required: true
+ hashtype:
+ description: Hashing algorithm to use.
+ type: string
+ default: sha512
+ choices: [ md5, blowfish, sha256, sha512 ]
+ salt:
+ description: Secret string that is used for the hashing, if none is provided a random one can be generated.
+ type: int
+ rounds:
+ description: Number of encryption rounds, default varies by algorithm used.
+ type: int
+ ident:
+ description: Algorithm identifier.
+ type: string
+
+EXAMPLES: |
+ # pwdhash => "$6$/bQCntzQ7VrgVcFa$VaMkmevkY1dqrx8neaenUDlVU.6L/.ojRbrnI4ID.yBHU6XON1cB422scCiXfUL5wRucMdLgJU0Fn38uoeBni/"
+ pwdhash: "{{ 'testing' | password_hash }}"
+
+RETURN:
+ _value:
+ description: The resulting password hash.
+ type: string