Skip to content

Commit

Permalink
Explicitly set the users section
Browse files Browse the repository at this point in the history
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 <gsamfira@cloudbasesolutions.com>
  • Loading branch information
gabriel-samfira committed Jan 27, 2024
1 parent a9efac1 commit b8f9f86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cloudconfig/cloudconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func NewDefaultCloudInitConfig() *CloudInit {
"curl",
"tar",
},
Users: []string{"default"},
SystemInfo: &SystemInfo{
DefaultUser: DefaultUser{
Name: defaults.DefaultUser,
Expand Down Expand Up @@ -69,6 +70,7 @@ type File struct {
type CloudInit struct {
mux sync.Mutex

Users []string `yaml:"users"`
PackageUpgrade bool `yaml:"package_upgrade"`
Packages []string `yaml:"packages,omitempty"`
SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys,omitempty"`
Expand Down

0 comments on commit b8f9f86

Please sign in to comment.