diff --git a/tasks/main.yml b/tasks/main.yml index 9913ea7..4980935 100755 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -32,7 +32,7 @@ salt: "{{ ((username + inventory_hostname) | hash('sha512'))[:16] }}" - name: Encrypt password for user {{ username }} - shell: python3 -c 'import crypt; print(crypt.crypt("{{ password }}", "$6${{ salt }}"))' + ansible.builtin.command: openssl passwd -6 -salt "{{ salt }}" "{{ password }}" register: username_shadowpw changed_when: false