##### SUMMARY

I'm currently using ansible 2.9.9 (latest available on debian testing), with python 3.8.5
I used a playbook developed with ansible 2.7.7 (latest on debian stable), and I've been kick out of all my servers because the salt used in the password_hash() function contains specials caracters.

I dont know if this is intentional, an element missing in the documentation or if I was simply not aware of that fact, in any case, I think that it could be interessting to warn other about this.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
User (password_hash)

##### ANSIBLE VERSION
2.9.9

##### STEPS TO REPRODUCE
```---
- name:
  hosts:
    - localhost
  gather_facts: false
  tasks:
    - debug:
        msg: "{{ 'password' | password_hash( 'sha512', 65534 | random( seed=inventory_hostname ) | string ) }}"
        
    - debug:
        msg: "{{ 'password' | password_hash( 'sha512', 'salt' ) }}"
        
    - debug:
        msg: "{{ 'password' | password_hash( 'sha512', 'salt-' ) }}"
        
    - debug:
        msg: "{{ 'password' | password_hash( 'sha512', 'salt_' ) }}"
```

##### ACTUAL RESULTS
```
[WARNING]: Unable to parse /home/.../ansible/inventory as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] *******************************************************************************************************************************************

TASK [debug] ***********************************************************************************************************************************************
ok: [localhost] => {
    "msg": "$6$43927$59/6eFzcpI0IigUdbYePA2OeIEwIkyqe9VJzYswDQhl6cD7I4SoZehr004rG.k4xB8/C5F7A4k9dU5LC1RdGn."
}

TASK [debug] ***********************************************************************************************************************************************
ok: [localhost] => {
    "msg": "$6$salt$IxDD3jeSOb5eB1CX5LBsqZFVkJdido3OUILO5Ifz5iwMuTS4XMS130MTSuDDl3aCI6WouIL9AjRbLCelDCy.g."
}

TASK [debug] ***********************************************************************************************************************************************
ok: [localhost] => {
    "msg": "*0"
}

TASK [debug] ***********************************************************************************************************************************************
ok: [localhost] => {
    "msg": "*0"
}

PLAY RECAP *************************************************************************************************************************************************
localhost                  : ok=4    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
```

##### EXPECTED RESULTS
Not "*0" for the password hashed.

relpath, params = _parse_parameters(term)
            path = self._loader.path_dwim(relpath)
            b_path = to_bytes(path, errors='surrogate_or_strict')
            chars = _gen_candidate_chars(params['chars'])
            changed = None
            
            first_process, lockfile = _get_lock(b_path)
            content = _read_password_file(b_path)
            if content is None or b_path == to_bytes('/dev/null'):
                plaintext_password = random_password(params['length'], chars)
                salt = None
                changed = True
            else:
                plaintext_password, salt = _parse_content(content)
            if params['encrypt'] and not salt:
                changed = True
                salt = random_salt()
            if changed and b_path != to_bytes('/dev/null'):
                content = _format_content(plaintext_password, salt, encrypt=params['encrypt'])
                _write_password_file(b_path, content)
            if first_process:
                
                _release_lock(lockfile)
            if params['encrypt']:
                password = do_encrypt(plaintext_password, params['encrypt'], salt=salt)
                ret.append(password)
            else:
                ret.append(plaintext_password)
        return ret