How to Update User Password with Ansible

Photo by Alek Kalinowski on Unsplash

It’s very easy to change a user’s password with Ansible. Here I included 2 ways for your perusal: one with Ansible Playbook, and another one directly via command line.

Before we proceed, since Ansible does not allow us to pass a cleartext password through the User module, we’ll need to leverage on a password hashing library in Python.