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