From 101c394cfc62733fcb9777c362c4d338f1623ef4 Mon Sep 17 00:00:00 2001 From: Erik Zilber Date: Wed, 4 Dec 2024 16:04:41 -0500 Subject: [PATCH] Added support for the authorized users field on the instance module (#627) --- docs/modules/instance.md | 1 + plugins/modules/instance.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/modules/instance.md b/docs/modules/instance.md index 2ba7737b..0630b91f 100644 --- a/docs/modules/instance.md +++ b/docs/modules/instance.md @@ -127,6 +127,7 @@ Manage Linode Instances, Configs, and Disks. | `region` |
`str`
|
Optional
| The location to deploy the instance in. See the [Linode API documentation](https://api.linode.com/v4/regions). | | `image` |
`str`
|
Optional
| The image ID to deploy the instance disk from. **(Conflicts With: `disks`,`configs`)** | | `authorized_keys` |
`list`
|
Optional
| A list of SSH public key parts to deploy for the root user. | +| `authorized_users` |
`list`
|
Optional
| A list of usernames. | | `root_pass` |
`str`
|
Optional
| The password for the root user. If not specified, one will be generated. This generated password will be available in the task success JSON. | | `stackscript_id` |
`int`
|
Optional
| The ID of the StackScript to use when creating the instance. See the [Linode API documentation](https://techdocs.akamai.com/linode-api/reference/get-stack-scripts). | | `stackscript_data` |
`dict`
|
Optional
| An object containing arguments to any User Defined Fields present in the StackScript used when creating the instance. Only valid when a stackscript_id is provided. See the [Linode API documentation](https://techdocs.akamai.com/linode-api/reference/get-stack-scripts). | diff --git a/plugins/modules/instance.py b/plugins/modules/instance.py index 3a7d5cda..da097020 100644 --- a/plugins/modules/instance.py +++ b/plugins/modules/instance.py @@ -351,6 +351,11 @@ "A list of SSH public key parts to deploy for the root user." ], ), + "authorized_users": SpecField( + type=FieldType.list, + element_type=FieldType.string, + description=["A list of usernames."], + ), "root_pass": SpecField( type=FieldType.string, no_log=True,