Add ability to configure system account password

Change-Id: Ifae2fa7d19472c601069ba9dff5b24396c2db338
This commit is contained in:
Anderson, Craig (ca846m) 2020-03-18 13:24:46 -07:00
parent 1e76684b39
commit 5af724cff0
2 changed files with 21 additions and 0 deletions

View File

@ -73,3 +73,21 @@ def find_ba_key(n):
{{ "{{" }}endif{{ "}}" }} {{ "{{" }}endif{{ "}}" }}
showtrace: true showtrace: true
verbosity: 2 verbosity: 2
{{- if not (empty .Values.conf.maas.system_user) }}
{{- if not (empty .Values.conf.maas.system_passwd) }}
write_files:
# Create cloud-init config that configures the 'root' user as the
# default user instead of 'centos'.
# Additionally, enables password authentication for this user.
userconfig:
path: /etc/cloud/cloud.cfg.d/00-user.cfg
content: |
ssh_pwauth: yes
disable_root: false
system_info:
default_user:
name: {{ .Values.conf.maas.system_user | squote }}
lock_passwd: false
plain_text_passwd: {{ .Values.conf.maas.system_passwd | squote }}
{{- end }}
{{- end }}

View File

@ -235,6 +235,9 @@ conf:
secret: secret:
namespace: maas namespace: maas
name: maas-api-key name: maas-api-key
# system user for console login/recovery in early phases of deployment
system_user: 'root'
system_passwd: 'password'
drivers: null drivers: null
#### If you populates drivers, it will replace the 3rd party driver #### If you populates drivers, it will replace the 3rd party driver
#### info that comes with MaaS. see structure below if it is needed #### info that comes with MaaS. see structure below if it is needed