Skip to content

docs: clarify default user entry in users examples - #6894

Merged
blackboxsw merged 1 commit into
canonical:mainfrom
alan747271363-art:docs-note-default-user-entry
Jun 10, 2026
Merged

docs: clarify default user entry in users examples#6894
blackboxsw merged 1 commit into
canonical:mainfrom
alan747271363-art:docs-note-default-user-entry

Conversation

@alan747271363-art

Copy link
Copy Markdown
Contributor

Summary

  • turn the existing default-user behavior warning into a more visible note in the Users and Groups module docs
  • add the same warning to the YAML example page so custom users: lists mention keeping default first

Fixes #6702.

Testing

  • git diff --check HEAD~1..HEAD
  • YAML parse check for doc/module-docs/cc_users_groups/data.yaml

Note: I could not run the full Sphinx docs build on Windows because importing cloud-init docs currently requires the Unix-only grp module in this environment.

Comment on lines +35 to +40
.. note::
If you provide a ``users`` list and still want cloud-init to create the
default distribution user, keep ``default`` as the first item in the
list. Omitting ``default`` skips creation of the default user and can
prevent cloud-provided SSH keys from being installed for that user.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this already documented?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was documented already, but with less visibility as inline documentation. This doc set provides more detail around the impact of omitting the - default user (like SSH keys being absent) which I don't think we document currently.

I'm +1 on creating this separate note to aid in visibility of the side-effects of omitting default.

Signed-off-by: Alan <alan747271363-art@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates cloud-init documentation to more explicitly warn that when providing a custom users: list, - default must remain the first entry to ensure the distro default user is created and receives cloud-provided SSH keys (addressing issue #6702).

Changes:

  • Adds a prominent note in the cc_users_groups module documentation describing the - default ordering requirement.
  • Adds the same warning to the YAML examples page for users/groups.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
doc/rtd/reference/yaml_examples/user_groups.rst Adds an explicit warning in the “Add users to the system” example section about keeping default first in users:.
doc/module-docs/cc_users_groups/data.yaml Converts the prior inline mention into a more visible .. note:: about keeping default first in users: lists.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread doc/rtd/reference/yaml_examples/user_groups.rst

@blackboxsw blackboxsw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alan747271363-art thank you for this submission. I believe this update improved visibility to the side-effects of removing - default setting from the users configuration in cloud-config.

@blackboxsw
blackboxsw merged commit cef1d0b into canonical:main Jun 10, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs]: Explicitly mention the need to put - default in the users array if we want to modify an existing user

4 participants