cloud-init/SOURCES/0006-rhel-cloud.cfg-remove-...

66 lines
2.4 KiB
Diff
Raw Normal View History

2022-11-15 06:34:59 +00:00
From 00f1f910d8d166ebe2913c12549f212c2d666c11 Mon Sep 17 00:00:00 2001
2022-05-17 08:38:23 +00:00
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Date: Thu, 20 May 2021 08:53:55 +0200
2022-11-15 06:34:59 +00:00
Subject: rhel/cloud.cfg: remove ssh_genkeytypes in settings.py and set in
cloud.cfg
2022-05-17 08:38:23 +00:00
RH-Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
2022-11-15 06:34:59 +00:00
RH-MergeRequest: 10: rhel/cloud.cfg: remove ssh_genkeytypes in settings.py and set in cloud.cfg
RH-Commit: [1/1] 6da989423b9b6e017afbac2f1af3649b0487310f
RH-Bugzilla: 1957532
2022-05-17 08:38:23 +00:00
RH-Acked-by: Eduardo Otubo <otubo@redhat.com>
2022-11-15 06:34:59 +00:00
RH-Acked-by: Cathy Avery <cavery@redhat.com>
2022-05-17 08:38:23 +00:00
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
2022-11-15 06:34:59 +00:00
RH-Acked-by: Mohamed Gamal Morsy <mmorsy@redhat.com>
2022-05-17 08:38:23 +00:00
Currently genkeytypes in cloud.cfg is set to None, so together with
ssh_deletekeys=1 cloudinit on first boot it will just delete the existing
keys and not generate new ones.
Just removing that property in cloud.cfg is not enough, because
settings.py provides another empty default value that will be used
instead, resulting to no key generated even when the property is not defined.
Removing genkeytypes also in settings.py will default to GENERATE_KEY_NAMES,
but since we want only 'rsa', 'ecdsa' and 'ed25519', add back genkeytypes in
cloud.cfg with the above defaults.
Also remove ssh_deletekeys in settings.py as we always need
to 1 (and it also defaults to 1).
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
cloudinit/settings.py | 2 --
rhel/cloud.cfg | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/cloudinit/settings.py b/cloudinit/settings.py
2022-11-15 06:34:59 +00:00
index aa2d6b95..38a90b70 100644
2022-05-17 08:38:23 +00:00
--- a/cloudinit/settings.py
+++ b/cloudinit/settings.py
2022-11-15 06:34:59 +00:00
@@ -52,8 +52,6 @@ CFG_BUILTIN = {
2022-05-17 08:38:23 +00:00
'def_log_file_mode': 0o600,
'log_cfgs': [],
'mount_default_fields': [None, None, 'auto', 'defaults,nofail', '0', '2'],
- 'ssh_deletekeys': False,
- 'ssh_genkeytypes': [],
'syslog_fix_perms': [],
'system_info': {
'paths': {
diff --git a/rhel/cloud.cfg b/rhel/cloud.cfg
2022-11-15 06:34:59 +00:00
index 1ec1a6c6..75d5c84b 100644
2022-05-17 08:38:23 +00:00
--- a/rhel/cloud.cfg
+++ b/rhel/cloud.cfg
@@ -7,7 +7,7 @@ ssh_pwauth: 0
2022-11-15 06:34:59 +00:00
mount_default_fields: [~, ~, 'auto', 'defaults,nofail,x-systemd.requires=cloud-init.service,_netdev', '0', '2']
2022-05-17 08:38:23 +00:00
resize_rootfs_tmp: /dev
ssh_deletekeys: 1
-ssh_genkeytypes: ~
+ssh_genkeytypes: ['rsa', 'ecdsa', 'ed25519']
syslog_fix_perms: ~
disable_vmware_customization: false
--
2022-11-15 06:34:59 +00:00
2.31.1
2022-05-17 08:38:23 +00:00