answers: move ssh-import-id directive to SSH section

When running answers-based automation, the SSH controller looks into
more than one section to find ssh-import-id directives.

If the "SSH" section exists, then it is where the ssh-import-id
directives must be placed. However, if the section does not exist, the
controller will also look for ssh-import-id directives in the "Identity"
section.

The answers.yaml file used this special mechanism. This is fine.
However, if one adds a SSH section to customize other settings (e.g.,
install_server, pwauth), then the ssh-import-id directives in the
Identity section suddently get ignored ; which is confusing and looks
as if there is a bug.

Let's move ssh-import-id directives to the SSH section.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This commit is contained in:
Olivier Gayot 2024-01-25 18:14:35 +01:00
parent 81ed199e17
commit 446bf3814d
1 changed files with 1 additions and 0 deletions

View File

@ -23,6 +23,7 @@ Identity:
hostname: ubuntu-server hostname: ubuntu-server
# ubuntu # ubuntu
password: '$6$wdAcoXrU039hKYPd$508Qvbe7ObUnxoj15DRCkzC3qO7edjH0VV7BPNRDYK4QR8ofJaEEF2heacn0QgD.f8pO8SNp83XNdWG6tocBM1' password: '$6$wdAcoXrU039hKYPd$508Qvbe7ObUnxoj15DRCkzC3qO7edjH0VV7BPNRDYK4QR8ofJaEEF2heacn0QgD.f8pO8SNp83XNdWG6tocBM1'
SSH:
# We have a specific dry-run behaviour for heracles, making the call to # We have a specific dry-run behaviour for heracles, making the call to
# ssh-import-id succeed unconditionally. # ssh-import-id succeed unconditionally.
ssh-import-id: lp:heracles ssh-import-id: lp:heracles