Update User Password with Ansible from Command Line 發表於 2020-10-28 更新於 2022-10-10 閱讀次數: Disqus: 文章字數: 430 所需閱讀時間 ≈ 1 分鐘 command123$ ansible -i hostfile all -m user \ -a "name=admin update_password=always password={{ newpassword|password_hash('sha512') }}" \ -b --extra-vars "newpassword=12345678" reference playbook或許用 playbook 比較好. 123456789---- hosts: all become: yes tasks: - name: Change user password user: name: admin update_password: always password: "{{ newpassword|password_hash('sha512') }}"