--- - name: Change password hosts: all become: true tasks: - name: Get new password ansible.builtin.pause: prompt: Enter the new password echo: false register: new_user_password - name: Change password ansible.builtin.user: name: "{{ interactive_user }}" password: "{{ new_user_password.user_input | password_hash('sha512') }}"