Comment 4 for bug 1978422

Revision history for this message
Mike Stroyan (stroyan) wrote :

Note that the warning message from the schema check is triggered by both the "lock-passwd" key and the representation of users_groups.user groups key as an array of strings rather than a single string with comma separated group names. I need to change both of those in the json file to make it accept the way that Ubuntu subiquity installer wrote the cloud config.

diff --git a/cloudinit/config/schemas/schema-cloud-config-v1.json b/cloudinit/config/schemas/schema-cloud-config-v1.json
index a5be310a..4e07c0c9 100644
--- a/cloudinit/config/schemas/schema-cloud-config-v1.json
+++ b/cloudinit/config/schemas/schema-cloud-config-v1.json
@@ -35,7 +35,8 @@
         },
         "groups": {
           "description": "Optional comma-separated string of groups to add the user to.",
- "type": "string"
+ "type": ["array", "string"],
+ "items": {"type": "string"}
         },
         "homedir": {
           "description": "Optional home dir for user. Default: ``/home/<username>``",
@@ -51,6 +52,11 @@
           "description": "Disable password login. Default: ``true``",
           "type": "boolean"
         },
+ "lock-passwd": {
+ "default": true,
+ "description": "Disable password login. Default: ``true``",
+ "type": "boolean"
+ },
         "no_create_home": {
           "default": false,
           "description": "Do not create home directory. Default: ``false``",