2020-12-02 10:49:08 +01:00
|
|
|
---
|
|
|
|
- hosts: all
|
|
|
|
become: yes
|
|
|
|
tasks:
|
|
|
|
- name: Change user password
|
|
|
|
user:
|
|
|
|
name: mg
|
|
|
|
update_password: always
|
2021-02-05 12:52:23 +01:00
|
|
|
password: "{{ lookup('keepass', 'mg_linux_password_hash', 'password') }}" #hier muss der hash rein
|
2020-12-02 10:49:08 +01:00
|
|
|
|
|
|
|
# Hash erstellen
|
|
|
|
# python -c 'import crypt,getpass; print(getpass.getpass("Name: ")+":"+crypt.crypt(getpass.getpass(),crypt.mksalt(crypt.METHOD_SHA512)))'
|
|
|
|
# oder
|
|
|
|
# mkpasswd --method=SHA-512 <passwort>
|