Project

General

Profile

« Previous | Next » 

Revision 2836e938

Added by Bastian Schmidt 3 months ago

Fixes #37011 - Apply latest Ubuntu Autoinstall userdata changes

  • Add explicit fallback for offline installation
  • Replace deprecated lock-passwd with lock_passwd
  • Remove empty ssh keys array if none provided

View differences:

app/views/unattended/provisioning_templates/user_data/preseed_autoinstall_cloud_init.erb
<% unless enable_auto_update -%>
disable_components: [multiverse]
disable_suites: [backports,security,updates]
fallback: offline-install
<% end -%>
<%= indent(4) { snippet_if_exists(template_name + " custom apt") } -%>
user-data:
......
users:
- name: <%= username_to_create %>
gecos: <%= realname_to_create %>
lock-passwd: false
lock_passwd: false
hashed_passwd: <%= password_to_create %>
<% if !host_param('remote_execution_ssh_keys').blank? -%>
<% if host_param('remote_execution_ssh_keys').is_a?(String) -%>
......
<% else -%>
ssh_authorized_keys: <%= host_param('remote_execution_ssh_keys') %>
<% end -%>
<% else -%>
ssh_authorized_keys: []
<% end -%>
keyboard:
layout: <%= host_param('keyboard', 'us') %>
test/unit/foreman/renderer/snapshots/ProvisioningTemplate/user_data/Preseed_Autoinstall_cloud-init_user_data.ubuntu_autoinst4dhcp.snap.txt
users:
- name: root
gecos: root
lock-passwd: false
lock_passwd: false
hashed_passwd: $1$rtd8Ub7R$5Ohzuy8WXlkaK9cA2T1wb0
ssh_authorized_keys: []
keyboard:
layout: us
toggle: null

Also available in: Unified diff