Skip to content

Instantly share code, notes, and snippets.

View yajith's full-sized avatar

Yajith Dayarathna yajith

View GitHub Profile
@krushik
krushik / passwd.yml
Last active May 1, 2023 13:30
ansible playbook to change user password on linux
---
# You may override default target user with -e user=someotheruser
# It is mandatory to choose a strong password! At least consult with https://www.bennish.net/password-strength-checker/
- name: change linux user password
hosts: [all]
gather_facts: no
vars_prompt:
## use this when 656K rounds will be OK for your servers' CPU performance, or when rounds number will become configurable in ansible
# You may need 'apt-get install python-passlib' or 'pip install passlib' for vars_prompt encryption