ansible-personal/misc-plays/change_password.yml
Alan Orth ffe7a872dd
roles: strict truthy values
According to Ansible we can use yes, true, True, "or any quoted st-
ring" for a boolean true, but ansible-lint wants us to use either
true or false.

See: https://chronicler.tech/red-hat-ansible-yes-no-and/
2022-09-10 22:33:19 +03:00

26 lines
835 B
YAML

---
# One-off playbook to change login credentials for provisioning user.
# Generate a SHA-512 password hash using python and add it in the one
# of the included variable files for the host.
#
# using python:
# $ python -c 'import crypt; print crypt.crypt("Soylent Green Is People!", "$6$saltiness")'
#
# playbook execution:
# $ ansible-playbook misc_plays/change_password.yml -K --limit=$host_or_group
#
- hosts: all
user: provisioning
become: true
vars_files:
- "../vars/{{ ansible_distribution }}.yml"
tasks:
- name: Set password, shell, homedir for provisioning user
when: provisioning_user is defined
user: name={{ provisioning_user.name }} password={{ provisioning_user.password }} shell={{ provisioning_user.shell }} state={{ provisioning_user.state }} createhome=false
# vim: set sw=2 ts=2: