role_common_local-os-password
An Ansible role to change an operating system's local user password
Defaults
This role requires variables defined in defaults/main.yml. Feel free to overwrite them as needed for your HashiCorp Vault setup for example in a group_vars or host_vars file.
-
fqdn_reverse: A variable that contains the reversed fully qualified domain name for each host. Forfully.qualified.domain.namethis variable will equalname.domain.qualified.fully. Consider this a suggestion for how to set up your HashiCorp Vaultkvsecrets hierarchy. -
local_os_password_vault_vars: The variables you want extracted from your Vault instance, by default['password', 'password_salt']which contain the new password to set for the local account and a salt, respectively. -
local_os_password_vault_base: The base path where all oflocal_os_password_vault_varsare located in Vault. -
local_os_password_vault_paths: The product of bothlocal_os_password_vault_baseandlocal_os_password_vault_varsstored in a dictionary. This is what the role uses in itsvault_kv2_getlookup. -
reset_password_for_account: The account for which you'd like to change its local account password, defaults toroot.
Use it
In your playbook.yml call it like so:
- name: 'Awesome playbook'
hosts: all
roles:
- 'role_common_local-os-password'