Note
This filter plugin is part of the ansible.netcommon collection (version 7.2.0).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install ansible.netcommon.
To use it in a playbook, specify: ansible.netcommon.hash_salt.
New in ansible.netcommon 1.0.0
password | ansible.netcommon.hash_salt(template.yml)This describes keyword parameters of the filter. These are the values key1=value1, key2=value2 and so on in the following example: input | ansible.netcommon.hash_salt(key1=value1, key2=value2, ...)
Parameter | Comments |
|---|---|
password string / required | This source data on which hash_salt invokes. For example |
Note
# Using hash_salt
# playbook
- name: Set the facts
ansible.builtin.set_fact:
password: "$1$avs$uSTOEMh65ADDBREAKqzvpb9yBMpzd/"
- name: Invoke hash_salt
ansible.builtin.debug:
msg: "{{ password | ansible.netcommon.hash_salt() }}"
# Task Output
# -----------
#
# TASK [Set the facts]
# ok: [host] => changed=false
# ansible_facts:
# password: $1$avs$uSTOEMh65ADDBREAKqzvpb9yBMpzd/
# TASK [Invoke hash_salt]
# ok: [host] =>
# msg: avs
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/hash_salt_filter.html