diff options
Diffstat (limited to 'roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2')
-rw-r--r-- | roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 index 48cc16bb..c2689623 100644 --- a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 +++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 @@ -110,7 +110,7 @@ d-i preseed/late_command string \ {% endif %} in-target bash -c "passwd -d root && passwd -l root"; \ {% if ansible_port is defined %} - in-target bash -c "sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ ansible_port }}/' -i /etc/ssh/sshd_config"; \ + in-target bash -c "sed -e 's/^\s*#*\s*Port\s\s*[0-9][0-9]*$/Port {{ ansible_port }}/' -i /etc/ssh/sshd_config"; \ {% endif %} mkdir -p -m 0700 /target/root/.ssh; \ cp /authorized_keys /target/root/.ssh/ |