Merge ~f30/cloud-init:cc_users-docs into cloud-init:master

Proposed by Felix Dreissig
Status: Merged
Merged at revision: d91f03177c264e1c889a31f078a6915b7cb75291
Proposed branch: ~f30/cloud-init:cc_users-docs
Merge into: cloud-init:master
Diff against target: 97 lines (+40/-19)
1 file modified
cloudinit/config/cc_users_groups.py (+40/-19)
Reviewer Review Type Date Requested Status
Scott Moser Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+323433@code.launchpad.net

Description of the change

This contains various improvements for the docs on "cc_users_groups":

It fixes an annoying typo/inconsistency ("ssh-autorized-keys" vs. "ssh-authorized-keys"), adds descriptions of previously missing config keys and improves overall consistency within the docs section.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/config/cc_users_groups.py b/cloudinit/config/cc_users_groups.py
2index 5964980..b80d1d3 100644
3--- a/cloudinit/config/cc_users_groups.py
4+++ b/cloudinit/config/cc_users_groups.py
5@@ -25,28 +25,39 @@ entry of the ``users`` list. Each entry in the ``users`` list, other than a
6 config keys for an entry in ``users`` are as follows:
7
8 - ``name``: The user's login name
9- - ``homedir``: Optional. Home dir for user. Default is ``/home/<username>``
10- - ``primary-group``: Optional. Primary group for user. Default to new group
11- named after user.
12+ - ``expiredate``: Optional. Date on which the user's login will be
13+ disabled. Default: none
14+ - ``gecos``: Optional. Comment about the user, usually a comma-separated
15+ string of real name and contact information. Default: none
16 - ``groups``: Optional. Additional groups to add the user to. Default: none
17- - ``selinux-user``: Optional. SELinux user for user's login. Default to
18- default SELinux user.
19- - ``lock_passwd``: Optional. Disable password login. Default: true
20+ - ``homedir``: Optional. Home dir for user. Default is ``/home/<username>``
21 - ``inactive``: Optional. Mark user inactive. Default: false
22- - ``passwd``: Hash of user password
23+ - ``lock_passwd``: Optional. Disable password login. Default: true
24 - ``no-create-home``: Optional. Do not create home directory. Default:
25 false
26- - ``no-user-group``: Optional. Do not create group named after user.
27- Default: false
28 - ``no-log-init``: Optional. Do not initialize lastlog and faillog for
29 user. Default: false
30- - ``ssh-import-id``: Optional. SSH id to import for user. Default: none
31- - ``ssh-autorized-keys``: Optional. List of ssh keys to add to user's
32+ - ``no-user-group``: Optional. Do not create group named after user.
33+ Default: false
34+ - ``passwd``: Hash of user password
35+ - ``primary-group``: Optional. Primary group for user. Default to new group
36+ named after user.
37+ - ``selinux-user``: Optional. SELinux user for user's login. Default to
38+ default SELinux user.
39+ - ``shell``: Optional. The user's login shell. The default is to set no
40+ shell, which results in a system-specific default being used.
41+ - ``snapuser``: Optional. Specify an email address to create the user as
42+ a Snappy user through ``snap create-user``. If an Ubuntu SSO account is
43+ associated with the address, username and SSH keys will be requested from
44+ there. Default: none
45+ - ``ssh-authorized-keys``: Optional. List of ssh keys to add to user's
46 authkeys file. Default: none
47+ - ``ssh-import-id``: Optional. SSH id to import for user. Default: none
48 - ``sudo``: Optional. Sudo rule to use, or list of sudo rules to use.
49 Default: none.
50 - ``system``: Optional. Create user as system user with no home directory.
51 Default: false
52+ - ``uid``: Optional. The user's ID. Default: The next available value.
53
54 .. note::
55 Specifying a hash of a user's password with ``passwd`` is a security risk
56@@ -65,23 +76,33 @@ config keys for an entry in ``users`` are as follows:
57 **Config keys**::
58
59 groups:
60- - ubuntu: [foo, bar]
61- - cloud-users
62+ - <group>: [<user>, <user>]
63+ - <group>
64
65 users:
66 - default
67 - name: <username>
68- gecos: <real name>
69- primary-group: <primary group>
70- groups: <additional groups>
71- selinux-user: <selinux username>
72 expiredate: <date>
73- ssh-import-id: <none/id>
74+ gecos: <comment>
75+ groups: <additional groups>
76+ homedir: <home directory>
77+ inactive: <true/false>
78 lock_passwd: <true/false>
79+ no-create-home: <true/false>
80+ no-log-init: <true/false>
81+ no-user-group: <true/false>
82 passwd: <password>
83+ primary-group: <primary group>
84+ selinux-user: <selinux username>
85+ shell: <shell path>
86+ snapuser: <email>
87+ ssh-authorized-keys:
88+ - <key>
89+ - <key>
90+ ssh-import-id: <id>
91 sudo: <sudo config>
92- inactive: <true/false>
93 system: <true/false>
94+ uid: <user id>
95 """
96
97 # Ensure this is aliased to a name not 'distros'

Subscribers

People subscribed via source and target branches