docs: clarify default user entry in users examples - #6894
Conversation
| .. 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. | ||
|
|
There was a problem hiding this comment.
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>
d4f241c to
fc946fd
Compare
There was a problem hiding this comment.
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_groupsmodule documentation describing the- defaultordering 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.
blackboxsw
left a comment
There was a problem hiding this comment.
@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.
Summary
users:lists mention keepingdefaultfirstFixes #6702.
Testing
git diff --check HEAD~1..HEADdoc/module-docs/cc_users_groups/data.yamlNote: I could not run the full Sphinx docs build on Windows because importing cloud-init docs currently requires the Unix-only
grpmodule in this environment.