r/base: Set root password

The *base* role will now set the password for the *root* user, if the
`root_password_hash` variable is defined.  This ensures that there is a
way to log into machines directly, even if other authentication
mechanisms like Active Directory are unavailable.
jenkins-master
Dustin 2021-10-16 15:20:49 -05:00
parent 00d30a67fb
commit 815240983f
1 changed files with 13 additions and 2 deletions

View File

@ -8,5 +8,16 @@
- name: ensure selinux python bindings are installed
package:
name={{ selinux_python_libs|join(',') }}
state=present
name: '{{ selinux_python_libs }}'
state: present
tags:
- install
- name: ensure root password is set
user:
name: root
password: '{{ root_password_hash }}'
when: root_password_hash is defined
tags:
- root-user
- user