Skip to content

Commit b8f9f86

Browse files
committedJan 27, 2024
Explicitly set the users section
On some cloud-init enabled systems, it's not enough to define the system_info section with the default user. We must also set the users section, even if we only do so to set the "default" user value. Signed-off-by: Gabriel Adrian Samfira <[email protected]>
1 parent a9efac1 commit b8f9f86

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎cloudconfig/cloudconfig.go

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ func NewDefaultCloudInitConfig() *CloudInit {
3434
"curl",
3535
"tar",
3636
},
37+
Users: []string{"default"},
3738
SystemInfo: &SystemInfo{
3839
DefaultUser: DefaultUser{
3940
Name: defaults.DefaultUser,
@@ -69,6 +70,7 @@ type File struct {
6970
type CloudInit struct {
7071
mux sync.Mutex
7172

73+
Users []string `yaml:"users"`
7274
PackageUpgrade bool `yaml:"package_upgrade"`
7375
Packages []string `yaml:"packages,omitempty"`
7476
SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys,omitempty"`

0 commit comments

Comments
 (0)
Please sign in to comment.