cat modify_pass.yml  

---

- hosts: stardb

 become: yes

 become_user: root

 become_method: sudo

 become_flags: -i

 gather_facts: false

 tasks:

 - name: change user passwd

  user: name={{ item.name }} password={{ item.chpass | password_hash('sha512')}} update_password=always

  with_items:

  - { name: 'pe', chpass: 'PD5dd1f42ebf@~' }