diskimage-builder/diskimage_builder
Cédric Jeanneret 6645f47db4 Ensure cloud-init is configured to generated host keys
It may happen a base image has an edited version of cloud-init
"cloud.cfg" that prevents the host keys to be generated.

While it didn't represent an issue with older releases of cloud-init,
starting cloud-init-22 this isn't true anymore.

Before that release, an sshd-keygen@.service was present and called by
sshd-keygen.target (which was called by sshd.service), and we ended up
with ssh host keys in any cases - either generated from cloud-init, or
generated by sshd-keygen.service.

But cloud-init-22 introduced an edition to the sshd-keygen.service,
making it check for the presence of cloud-init service, and preventing
this sshd-keygen to kick in this case.

So we'd better ensure cloud-init is able to generate the keys, else
we'll be in a bad state, since it's instructed to remove the ones
present.

Closes-Bug: #1971751
Change-Id: I37b2f3e9d57a86544ef14e74a4a927309c18bbf0
2022-05-06 11:10:54 +02:00
..
block_device Replace deprecated import of ABCs from collections 2021-07-17 01:02:19 +09:00
elements Ensure cloud-init is configured to generated host keys 2022-05-06 11:10:54 +02:00
lib Correctly create DIB_ENV variable and dib_environment file 2022-02-28 16:46:16 +03:00
tests Switch from unittest2 compat methods to Python 3.x methods 2020-07-07 11:11:28 +08:00
__init__.py Bump hacking to 0.9.x series 2014-07-21 10:15:41 +02:00
disk_image_create.py Remove virtualenv activation 2020-06-11 16:49:15 +10:00
element_dependencies.py Uncap hacking 2020-02-24 10:34:46 +11:00
logging_config.py Add timestamp output filter 2017-06-16 15:58:50 +10:00
paths.py Move diskimage-image-create to an entry point 2016-11-02 05:12:11 +00:00
version.py Create docs site containing element READMEs 2015-02-10 11:45:35 -08:00